This website works better with JavaScript.
Home
Explore
Help
Sign In
isprogram
/
tree-sitter-c
mirror of
https://github.com/tree-sitter/tree-sitter-c
Watch
1
Star
0
Fork
0
Code
Issues
0
Projects
0
Releases
79
Wiki
Activity
Browse Source
Fix inefficient string tokenization
pull/16/merge
Max Brunsfeld
7 years ago
parent
05f62b9f84
commit
a71bef804d
3 changed files
with
885 additions
and
823 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
grammar.js
+1
-1
src/grammar.json
+883
-821
src/parser.c
+ 1
- 1
grammar.js
View File
@ -700,7 +700,7 @@ module.exports = grammar({
string_literal
:
$
=>
seq
(
'"'
,
repeat
(
choice
(
token
.
immediate
(
prec
(
1
,
/[^\\"\n]/
)
)
,
token
.
immediate
(
prec
(
1
,
/[^\\"\n]
+
/
)
)
,
$
.
escape_sequence
)
)
,
'"'
+ 1
- 1
src/grammar.json
View File
@ -4152,7 +4152,7 @@
"value"
:
1
,
"content"
:
{
"type"
:
"PATTERN"
,
"value"
:
"[^\\\\\"\\n]"
"value"
:
"[^\\\\\"\\n]
+
"
}
}
}
,
+ 883
- 821
src/parser.c
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save