calixteman
6002fcd5e8
Add a rule for left part of assignment: it'll be helpful to add scope… ( #37 )
* Add a rule for left part of assignment: it'll be helpful to add scoped_name_identifier (c++)
* Inline the assignment_left_expression rule
6 years ago
calixteman
c455818961
#include can be followed by a macro name or a macro call ( #38 )
* #include can be followed by a macro name or a macro call
* In preproc_include, use preproc_call_expression
6 years ago
Max Brunsfeld
b6ff8fbdaf
Handle line continuations with CRLF endings
6 years ago
calixteman
362c031880
Parse expressions in preprocessor #if statement ( #29 )
* Parse expressions in preprocessor #if statement
* Make preproc_expression look like a normal expression
* Hide the wrapper rules
* Alias the rulres to match their corresponding expression rule
* Handle line continuations as extra tokens
6 years ago
calixteman
2ed529f075
Add u|U|u8 string|char support ( #36 )
6 years ago
Max Brunsfeld
627806ec6a
Allow case statements separate from switch statements
Fixes #32
6 years ago
Max Brunsfeld
916be99704
Allow comma operator in return statement
Fixes #31
6 years ago
calixteman
c578638af2
Fix multi-statements in for initializer and update parts ( #27 )
* Fix multi-statements in for initializer and update parts
* Finally the bug was only in the initializer part
7 years ago
calixteman
c8061429cc
Fix error with ++L (consequence of support for L strings) ( #26 )
* Fix error with ++L (consequence of support for L strings)
* Update to tree-sitter 0.15.5
7 years ago
Max Brunsfeld
e0512072cc
Handle comments with escaped CRLF line endings
Fixes #24
7 years ago
Max Brunsfeld
0bc1adf0c2
Tweak fields
7 years ago
Max Brunsfeld
c3965938cc
Add node fields, update tree-sitter-cli
7 years ago
calixteman
ff4fc1c785
Handle L-strings and L-chars ( #25 )
7 years ago
calixteman
2945de0173
Fix precedences of * (deref) and & (address-of) ( #21 )
7 years ago
calixteman
adf868ce9a
Fix parenthesized expression on left side of assignment ( #22 )
7 years ago
calixteman
fb9fbd83f0
Handle __attribute__ in function declaration ( #19 )
* Handle __attribute__ in function declaration
* Fix tests in examples/
* Remove useless optional
7 years ago
Calixte Denizet
338f99e8a0
Fix comment containing backslash
7 years ago
Max Brunsfeld
42382f29bf
Restrict expressions that can appear as lhs in assignment
7 years ago
Max Brunsfeld
fd42e75886
Flesh out number literal parsing
Fixes atom/language-c#323
7 years ago
Max Brunsfeld
175d93b439
Handle postfix type qualifiers in compound literals
Fixes atom/language-c#312
7 years ago
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 years ago
Max Brunsfeld
5a25ac2983
Allow multiple names to be defined in a typedef statement
Fixes tree-sitter/tree-sitter-cpp#30
7 years ago
Max Brunsfeld
50c3a02bc7
Allow preprocessor directives in field decl lists
Fixes tree-sitter/tree-sitter-cpp#29
7 years ago
Max Brunsfeld
1358e07759
Allow escaped newlines in single-line comments
Fixes tree-sitter/tree-sitter-cpp#26
7 years ago
Max Brunsfeld
5b250e138a
Remove distinction between top-level and statement block items
7 years ago
Max Brunsfeld
a71bef804d
Fix inefficient string tokenization
7 years ago
Max Brunsfeld
7f827b42a8
Add explicit nodes for bitfield clauses
7 years ago
Max Brunsfeld
ce980349b2
Fix preprocessor argument parsing with CRLF line endings
Fixes #11
7 years ago
Max Brunsfeld
176fd5f077
Add signed keyword
Fixes #10
7 years ago
Max Brunsfeld
2af332790e
Make case statements contain all subsequent statements until the next case
7 years ago
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 years ago
Max Brunsfeld
ed56d5e288
Fix array declarator parsing
Refs https://github.com/atom/atom/issues/18346#issuecomment-433734281
7 years ago
Max Brunsfeld
6744ae08ea
Parse top-level macro invocations
Fixes atom/atom#18346
7 years ago
Max Brunsfeld
5b5300388e
Add low dynamic precedence on macro_type_specifier
7 years ago
Max Brunsfeld
07cafeac95
Use dynamic precedence to distinguish pointer declarators from multiplication
8 years ago
Max Brunsfeld
9e8ac821e4
Don't allow whitespace inside of string literals
8 years ago
Max Brunsfeld
067d3f9681
Use parenthesized_expression in if, while, do statements
8 years ago
Max Brunsfeld
288d6b2b1c
Use immediate tokens for preprocessor functions
8 years ago
Max Brunsfeld
df769721cb
Parse escape sequences
8 years ago
Max Brunsfeld
f8cab65c3a
Allow type qualifier lists in pointer declarators
Fixes tree-sitter/tree-sitter-cpp#7
8 years ago
Max Brunsfeld
3a185d00e2
Add explicit word token
Refs https://github.com/tree-sitter/tree-sitter/pull/176
8 years ago
Max Brunsfeld
9e21e17371
Allow preprocessor conditionals inside of field declaration lists
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
8 years ago
Max Brunsfeld
cc0dff55a0
Don't allow newlines in system lib strings
8 years ago
Max Brunsfeld
95b1b4315e
Add _Atomic and restrict type qualifiers
8 years ago
Max Brunsfeld
e8b6879820
Use repeat in initializer lists
8 years ago
Max Brunsfeld
0c38b9f8c9
Handle identifier starting with 'false', 'true', etc
8 years ago
Max Brunsfeld
a76daa432c
Fix parsing of char16_t, char32_t
8 years ago
Max Brunsfeld
3a97441df7
Require a line break after an unknown preprocessor directive
8 years ago
Max Brunsfeld
e6c28cafb3
Avoid relying on old, non-standard tree-sitter regex feature
8 years ago
Max Brunsfeld
db8d3af84f
Add #elifs inside of #ifdefs
Signed-off-by: Nathan Sobo <nathan@github.com>
8 years ago