Max Brunsfeld
fcb4537288
Fix regex for unknown preprocessor directives
Signed-off-by: Nathan Sobo <nathan@github.com>
il y a 8 ans
Max Brunsfeld
82b62611b6
Differentiate primitive types from other type names
il y a 8 ans
Max Brunsfeld
f433b2bf8a
Tweak identifier naming convention
il y a 9 ans
Max Brunsfeld
9e7706d922
Distinguish variables, types, fields and labels using renames
il y a 9 ans
Max Brunsfeld
debe919f84
Allow whitespace after the # in preprocessor directives
il y a 9 ans
Max Brunsfeld
d9c324ffce
Don't try to parse #if conditions as C expressions
Doing this required treating the newline that follows these conditions as significant
in order to avoid conflicts, but this caused problems for error recovery.
il y a 9 ans
Max Brunsfeld
39a662907b
Make a named node for argument lists in call expressions
il y a 9 ans
Max Brunsfeld
eaa878ce95
Allow preprocessor conditionals inside functions
il y a 9 ans
Max Brunsfeld
e64b56050e
Add preprocessor if blocks
il y a 9 ans
Max Brunsfeld
eed36b3f88
Allow object-like defines whose values start with parentheses
il y a 9 ans
Max Brunsfeld
f4fca3e638
⬆️ tree-sitter, rename grammar_test to corpus
il y a 9 ans
Max Brunsfeld
6093f6f023
Tweak test for #defines
il y a 10 ans
Max Brunsfeld
fb4ace990e
Fix issues with preprocessor defininitions
il y a 10 ans
Max Brunsfeld
1844ad2d93
Add some error recovery points
il y a 10 ans
Max Brunsfeld
f6dc4d7942
Add structure to #ifdef blocks
il y a 10 ans
Max Brunsfeld
87ad2e9c69
Base grammar on existing C99 grammar
il y a 11 ans
Max Brunsfeld
afac264377
Add #ifndef et al
il y a 11 ans
Max Brunsfeld
705256dbba
Update tests and grammar for new tree-sitter
Now there is never a need to mark a repeat rule as optional
il y a 12 ans
Max Brunsfeld
474975e32b
Add unions, enums
il y a 12 ans
Max Brunsfeld
c91415338d
Initial commit
il y a 12 ans