Allow underscores in IDENT tokens. Fixes #3.
IDENT syntax now includes ASCII letters and underscores, so '.foo_bar' now works. Non-ASCII letters won't work in IDENT tokens (it's impossible to tell which non-ascii characters are "letters" without full unicode tables), so '.données' is still a syntax error (the workaround is '.["données"]', since you can put anything you like in a string).
This commit is contained in:
1 parent
359d5f33bd
commit
a2643cc0d5
2 files changed
+5
-1
No files matched your search
@@ -107,7 +107,7 @@
|
||||
}
|
||||
|
||||
|
||||
[[:alnum:]]+ { yylval->literal = jv_string(yytext); return IDENT;}
|
||||
[a-zA-Z_][a-zA-Z_0-9]* { yylval->literal = jv_string(yytext); return IDENT;}
|
||||
|
||||
[ \n\t]+ {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user