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
Require a line break after an unknown preprocessor directive
pull/8/head
Max Brunsfeld
8 years ago
parent
e6c28cafb3
commit
3a97441df7
3 changed files
with
54074 additions
and
53705 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-1
grammar.js
+23
-2
src/grammar.json
+54049
-53702
src/parser.c
+ 2
- 1
grammar.js
View File
@ -104,7 +104,8 @@ module.exports = grammar({
preproc_call
:
$
=>
seq
(
$
.
preproc_directive
,
$
.
preproc_arg
optional
(
seq
(
/[ \t]+/
,
$
.
preproc_arg
)
)
,
'\n'
)
,
preproc_if
:
$
=>
seq
(
+ 23
- 2
src/grammar.json
View File
@ -292,8 +292,29 @@
"name"
:
"preproc_directive"
}
,
{
"type"
:
"SYMBOL"
,
"name"
:
"preproc_arg"
"type"
:
"CHOICE"
,
"members"
:
[
{
"type"
:
"SEQ"
,
"members"
:
[
{
"type"
:
"PATTERN"
,
"value"
:
"[ \\t]+"
}
,
{
"type"
:
"SYMBOL"
,
"name"
:
"preproc_arg"
}
]
}
,
{
"type"
:
"BLANK"
}
]
}
,
{
"type"
:
"STRING"
,
"value"
:
"\n"
}
]
}
,
+ 54049
- 53702
src/parser.c
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save