mirror of
https://github.com/JellyApple102/tree-sitter-dfraw.git
synced 2024-11-22 14:09:20 +02:00
update string punctuation
This commit is contained in:
parent
287aa02865
commit
39af2e5e72
|
@ -36,7 +36,7 @@ module.exports = grammar({
|
||||||
|
|
||||||
large: $ => /[A-Z_\d]+/,
|
large: $ => /[A-Z_\d]+/,
|
||||||
|
|
||||||
string: $ => /[A-Za-z \-,.'/\\]+/,
|
string: $ => /[A-Za-z \-,.'/\\=]+/,
|
||||||
|
|
||||||
separator: $ => /:/,
|
separator: $ => /:/,
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
},
|
},
|
||||||
"string": {
|
"string": {
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "[A-Za-z \\-,.'/\\\\]+"
|
"value": "[A-Za-z \\-,.'/\\\\=]+"
|
||||||
},
|
},
|
||||||
"separator": {
|
"separator": {
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
|
|
|
@ -183,6 +183,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
||||||
if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(7);
|
if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(7);
|
||||||
if (lookahead == '\'' ||
|
if (lookahead == '\'' ||
|
||||||
(',' <= lookahead && lookahead <= '/') ||
|
(',' <= lookahead && lookahead <= '/') ||
|
||||||
|
lookahead == '=' ||
|
||||||
lookahead == '\\' ||
|
lookahead == '\\' ||
|
||||||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
||||||
END_STATE();
|
END_STATE();
|
||||||
|
@ -222,6 +223,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
||||||
if (lookahead == ' ' ||
|
if (lookahead == ' ' ||
|
||||||
lookahead == '\'' ||
|
lookahead == '\'' ||
|
||||||
(',' <= lookahead && lookahead <= '/') ||
|
(',' <= lookahead && lookahead <= '/') ||
|
||||||
|
lookahead == '=' ||
|
||||||
lookahead == '\\' ||
|
lookahead == '\\' ||
|
||||||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
||||||
END_STATE();
|
END_STATE();
|
||||||
|
@ -242,6 +244,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
||||||
if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(7);
|
if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(7);
|
||||||
if (lookahead == '\'' ||
|
if (lookahead == '\'' ||
|
||||||
(',' <= lookahead && lookahead <= '/') ||
|
(',' <= lookahead && lookahead <= '/') ||
|
||||||
|
lookahead == '=' ||
|
||||||
lookahead == '\\' ||
|
lookahead == '\\' ||
|
||||||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
||||||
END_STATE();
|
END_STATE();
|
||||||
|
@ -250,6 +253,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
||||||
if (lookahead == ' ' ||
|
if (lookahead == ' ' ||
|
||||||
lookahead == '\'' ||
|
lookahead == '\'' ||
|
||||||
(',' <= lookahead && lookahead <= '/') ||
|
(',' <= lookahead && lookahead <= '/') ||
|
||||||
|
lookahead == '=' ||
|
||||||
('A' <= lookahead && lookahead <= 'Z') ||
|
('A' <= lookahead && lookahead <= 'Z') ||
|
||||||
lookahead == '\\' ||
|
lookahead == '\\' ||
|
||||||
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
('a' <= lookahead && lookahead <= 'z')) ADVANCE(11);
|
||||||
|
|
|
@ -7,7 +7,7 @@ opening_comment
|
||||||
[TEST:BODY_1PART] comment here
|
[TEST:BODY_1PART] comment here
|
||||||
[MULTIPLE:string:123:LARGE]
|
[MULTIPLE:string:123:LARGE]
|
||||||
[SINGLE_TEST]
|
[SINGLE_TEST]
|
||||||
[HERE:A string, contating lot's of diffent-punctuation.]
|
[HERE:A string, contating=lot's of diffent-punctuation.]
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue