Skip to content

Commit

Permalink
fix(parser): un-reserve ",", "<", and ">" from identifier strings
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgw committed Jan 8, 2025
1 parent 89eb557 commit 375d8b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const CloseMultiLineComment = createToken({
// Values
const Identifier = createToken({
name: 'Identifier',
pattern: /(?![+-]\d)[\x21\x23-\x27\x2A\x2B\x2D\x2E\x3A\x3F-\x5A\x5E-\x7A\x7C\x7E-\uFFFF][\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x3A\x3F-\x5A\x5E-\x7A\x7C\x7E-\uFFFF]*/
pattern: /(?![+-]\d)[\x21\x23-\x27\x2A-\x2E\x3A\x3C\x3E-\x5A\x5E-\x7A\x7C\x7E-\uFFFF][\x21\x23-\x27\x2A-\x2E\x30-\x3A\x3C\x3E-\x5A\x5E-\x7A\x7C\x7E-\uFFFF]*/
})
const Boolean = createToken({ name: 'Boolean', pattern: /true|false/, longer_alt: Identifier })
const Null = createToken({ name: 'Null', pattern: /null/, longer_alt: Identifier })
Expand Down

0 comments on commit 375d8b8

Please sign in to comment.