Allow underscores, dashes, and digits in identifiers

This commit is contained in:
Yoshi Askharoun
2024-02-10 21:37:12 -06:00
parent 3329591b5a
commit 93fa998caa
5 changed files with 28 additions and 12 deletions
+2
View File
@@ -12,6 +12,8 @@ public static partial class Lexer
public static readonly Parser<string> WholeNumber = Parse.Digit.AtLeastOnce().Text();
public static readonly Parser<string> Identifier = Parse.LetterOrDigit.Or(Parse.Chars('_', '-')).AtLeastOnce().Text();
public static readonly Parser<string> Uri = Parse.LetterOrDigit.Or(Parse.Chars(":/!._-")).AtLeastOnce().Text();
public static readonly Parser<string> StatementEnd = Parse.Char(';').Return(";").Or(Parse.LineTerminator);