Max Brunsfeld
42382f29bf
Restrict expressions that can appear as lhs in assignment
пре 7 година
Max Brunsfeld
fd42e75886
Flesh out number literal parsing
Fixes atom/language-c#323
пре 7 година
Max Brunsfeld
175d93b439
Handle postfix type qualifiers in compound literals
Fixes atom/language-c#312
пре 7 година
Max Brunsfeld
95b5710ff9
Allow number literals with 'f' suffix and digit separators
Fixes tree-sitter/tree-sitter-cpp#24
Fixes tree-sitter/tree-sitter-cpp#34
пре 7 година
Max Brunsfeld
5a25ac2983
Allow multiple names to be defined in a typedef statement
Fixes tree-sitter/tree-sitter-cpp#30
пре 7 година
Max Brunsfeld
50c3a02bc7
Allow preprocessor directives in field decl lists
Fixes tree-sitter/tree-sitter-cpp#29
пре 7 година
Max Brunsfeld
1358e07759
Allow escaped newlines in single-line comments
Fixes tree-sitter/tree-sitter-cpp#26
пре 7 година
Max Brunsfeld
5b250e138a
Remove distinction between top-level and statement block items
пре 7 година
Max Brunsfeld
a71bef804d
Fix inefficient string tokenization
пре 7 година
Max Brunsfeld
7f827b42a8
Add explicit nodes for bitfield clauses
пре 7 година
Max Brunsfeld
ce980349b2
Fix preprocessor argument parsing with CRLF line endings
Fixes #11
пре 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
9e8ac821e4
Don't allow whitespace inside of string literals
пре 8 година
Max Brunsfeld
067d3f9681
Use parenthesized_expression in if, while, do statements
пре 8 година
Max Brunsfeld
288d6b2b1c
Use immediate tokens for preprocessor functions
пре 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
3a185d00e2
Add explicit word token
Refs https://github.com/tree-sitter/tree-sitter/pull/176
пре 8 година
Max Brunsfeld
9e21e17371
Allow preprocessor conditionals inside of field declaration lists
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
пре 8 година
Max Brunsfeld
cc0dff55a0
Don't allow newlines in system lib strings
пре 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
3a97441df7
Require a line break after an unknown preprocessor directive
пре 8 година
Max Brunsfeld
e6c28cafb3
Avoid relying on old, non-standard tree-sitter regex feature
пре 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
d80749fc3f
Boost the dynamic precedence of parameter lists (mostly for C++)
пре 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
809cd89afe
Use new alias API
пре 9 година
Max Brunsfeld
6147b5ecca
Rename label_name -> label, extract rules for identifier renames
пре 9 година
Max Brunsfeld
b8509fdf21
Function calls have higher precedence than unary operators
пре 9 година
Max Brunsfeld
7775b575e6
Differentiate between top-level items and those that appear in statement blocks
пре 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 година