Max Brunsfeld
7f827b42a8
Add explicit nodes for bitfield clauses
7 роки тому
Max Brunsfeld
176fd5f077
Add signed keyword
Fixes #10
7 роки тому
Max Brunsfeld
2af332790e
Make case statements contain all subsequent statements until the next case
7 роки тому
Max Brunsfeld
6cbb20b681
Allow any sort of statement at the top level, not just calls
This way, we can parse snippets of C, like expressions, in the
case where C code is injected into a larger document.
7 роки тому
Max Brunsfeld
ed56d5e288
Fix array declarator parsing
Refs https://github.com/atom/atom/issues/18346#issuecomment-433734281
7 роки тому
Max Brunsfeld
6744ae08ea
Parse top-level macro invocations
Fixes atom/atom#18346
7 роки тому
Max Brunsfeld
5b5300388e
Add low dynamic precedence on macro_type_specifier
7 роки тому
Max Brunsfeld
07cafeac95
Use dynamic precedence to distinguish pointer declarators from multiplication
8 роки тому
Max Brunsfeld
067d3f9681
Use parenthesized_expression in if, while, do statements
8 роки тому
Max Brunsfeld
df769721cb
Parse escape sequences
8 роки тому
Max Brunsfeld
f8cab65c3a
Allow type qualifier lists in pointer declarators
Fixes tree-sitter/tree-sitter-cpp#7
8 роки тому
Max Brunsfeld
9e21e17371
Allow preprocessor conditionals inside of field declaration lists
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
8 роки тому
Max Brunsfeld
95b1b4315e
Add _Atomic and restrict type qualifiers
8 роки тому
Max Brunsfeld
e8b6879820
Use repeat in initializer lists
8 роки тому
Max Brunsfeld
0c38b9f8c9
Handle identifier starting with 'false', 'true', etc
8 роки тому
Max Brunsfeld
a76daa432c
Fix parsing of char16_t, char32_t
8 роки тому
Max Brunsfeld
db8d3af84f
Add #elifs inside of #ifdefs
Signed-off-by: Nathan Sobo <nathan@github.com>
8 роки тому
Max Brunsfeld
065bee2c23
Add preprocessor elif clauses
Signed-off-by: Nathan Sobo <nathan@github.com>
8 роки тому
Max Brunsfeld
fcb4537288
Fix regex for unknown preprocessor directives
Signed-off-by: Nathan Sobo <nathan@github.com>
8 роки тому
Max Brunsfeld
1e1f7c9cf8
Parse typedef names as type_identifiers
8 роки тому
Max Brunsfeld
060b072223
Fix interpretation of 'unsigned' et al as standalone types
8 роки тому
Max Brunsfeld
82b62611b6
Differentiate primitive types from other type names
8 роки тому
Max Brunsfeld
c4ed85b79b
Call inline a storage class specifier like static
8 роки тому
Max Brunsfeld
31c966ece2
Handle multi-line comments with asterisks at the end
8 роки тому
Max Brunsfeld
f433b2bf8a
Tweak identifier naming convention
9 роки тому
Max Brunsfeld
6147b5ecca
Rename label_name -> label, extract rules for identifier renames
9 роки тому
Max Brunsfeld
66003e2afc
Rename type_clause -> type_descriptor and pull out the parens
9 роки тому
Max Brunsfeld
9e7706d922
Distinguish variables, types, fields and labels using renames
9 роки тому
Max Brunsfeld
debe919f84
Allow whitespace after the # in preprocessor directives
9 роки тому
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.
9 роки тому
Max Brunsfeld
eb82660b87
Generalize the ordering of type and declaration specifiers
9 роки тому
Max Brunsfeld
ab0162ce37
Make member_declaration_list its own rule
9 роки тому
Max Brunsfeld
42436c29ae
Allow simple abstract function declarators as in `sizeof(void * ())`
9 роки тому
Max Brunsfeld
39a662907b
Make a named node for argument lists in call expressions
9 роки тому
Max Brunsfeld
281e0cd60d
Add 'u' and 'l' suffixes on number literals
9 роки тому
Max Brunsfeld
eaa878ce95
Allow preprocessor conditionals inside functions
9 роки тому
Max Brunsfeld
e64b56050e
Add preprocessor if blocks
9 роки тому
Max Brunsfeld
8e8a968e3b
Fix handling of backslashes in string literals
9 роки тому
Max Brunsfeld
9b715a2620
Add concatenated strings
9 роки тому
Max Brunsfeld
fb51d81c99
Add comma expressions, make parenthesized expressions named rules
9 роки тому
Max Brunsfeld
c2a7bd2d9c
Allow any type name in a macro-defined type
9 роки тому
Max Brunsfeld
eed36b3f88
Allow object-like defines whose values start with parentheses
9 роки тому
Max Brunsfeld
be2676ed3e
Allow empty initializer lists
9 роки тому
Max Brunsfeld
f3ea61c8fe
Add C++ linkage specifiers, since they appear in .h files
9 роки тому
Max Brunsfeld
367cd73ee2
Allow unsigned, short, etc to be their own types
9 роки тому
Max Brunsfeld
f4fca3e638
⬆️ tree-sitter, rename grammar_test to corpus
9 роки тому