Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/idea-parser/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const definitions: Record<string, Reader> = {
};
},
'Float': (code, start) => {
const match = code.slice(start).match(/^\d+\.\d+/);
const match = code.slice(start).match(/^-?\d+\.\d+/);
if (match !== null && match.index === 0) {
const end = start + match[0].length;
const value = code.substring(start, end);
Expand All @@ -147,7 +147,7 @@ const definitions: Record<string, Reader> = {
return undefined;
},
'Integer': (code, start) => {
const match = code.slice(start).match(/^[0-9]+/);
const match = code.slice(start).match(/^-?[0-9]+/);
if (match !== null && match.index === 0) {
const end = start + match[0].length;
const value = code.substring(start, end);
Expand Down