update string punctuation

This commit is contained in:
JellyApple102 2021-09-23 22:58:36 -04:00
parent dc3c610e5f
commit 07f6a311b2
3 changed files with 10 additions and 6 deletions

View file

@ -36,7 +36,7 @@ module.exports = grammar({
large: $ => /[A-Z_\d]+/,
string: $ => /[A-Za-z \-,.']+/,
string: $ => /[A-Za-z \-,.'/\\]+/,
separator: $ => /:/,

View file

@ -121,7 +121,7 @@
},
"string": {
"type": "PATTERN",
"value": "[A-Za-z \\-,.']+"
"value": "[A-Za-z \\-,.'/\\\\]+"
},
"separator": {
"type": "PATTERN",

View file

@ -182,7 +182,8 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(9);
if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(7);
if (lookahead == '\'' ||
(',' <= lookahead && lookahead <= '.') ||
(',' <= lookahead && lookahead <= '/') ||
lookahead == '\\' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
END_STATE();
case 2:
@ -220,7 +221,8 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(7);
if (lookahead == ' ' ||
lookahead == '\'' ||
(',' <= lookahead && lookahead <= '.') ||
(',' <= lookahead && lookahead <= '/') ||
lookahead == '\\' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
END_STATE();
case 8:
@ -239,15 +241,17 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
if (('0' <= lookahead && lookahead <= '9')) ADVANCE(9);
if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(7);
if (lookahead == '\'' ||
(',' <= lookahead && lookahead <= '.') ||
(',' <= lookahead && lookahead <= '/') ||
lookahead == '\\' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
END_STATE();
case 11:
ACCEPT_TOKEN(sym_string);
if (lookahead == ' ' ||
lookahead == '\'' ||
(',' <= lookahead && lookahead <= '.') ||
(',' <= lookahead && lookahead <= '/') ||
('A' <= lookahead && lookahead <= 'Z') ||
lookahead == '\\' ||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
END_STATE();
case 12: