antoinemadec
7f678a26bb
Add else_clause
3 роки тому
Christian Clason
6adee19458
feat: allow identifiers in string concatenations ( #145 )
* feat: allow identifiers in string concatenations
Resolves errors in strings of the form:
("failed in line %" PRIdLINENR)
---------
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
3 роки тому
Amaan Qureshi
a44d8c5ca5
chore: add a test for multi-backslash delimited comments
3 роки тому
John Drouhard
0720f9c2af
Add test for comma expression in iteration expression
4 роки тому
John Drouhard
179b70c6be
Attributes: simplify attributed_statement by making it a valid type of non-case statement
This also lets it bind to _any_ statement, which is necessary for some
c++ attributes that can attach to the statement in if, while, and
do/while statements.
4 роки тому
jdrouhard
9bee34500c
Support attribute statements under case statements ( #83 )
4 роки тому
John Drouhard
0b714a5134
rename attribute_definition to attribute_declaration
4 роки тому
jdrouhard
8fc135a72b
Add support for C23 attributes ( #81 )
* Add support for C23 attributes
https://en.cppreference.com/w/c/language/attributes
* Use wrapper for statements with attributes to reduce state machine size
* Missed a couple _declarators that needed attributes directly after
* Use annotated_declarator for declarators that have attributes immediately following them
* Give field and type declarators the same attribute treatment
4 роки тому
Max Brunsfeld
457a7917a1
Use new test structure, add syntax highlighting tests
6 роки тому
Max Brunsfeld
627806ec6a
Allow case statements separate from switch statements
Fixes #32
6 роки тому
Max Brunsfeld
916be99704
Allow comma operator in return statement
Fixes #31
6 роки тому
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 роки тому
Max Brunsfeld
c3965938cc
Add node fields, update tree-sitter-cli
7 роки тому
Max Brunsfeld
2af332790e
Make case statements contain all subsequent statements until the next case
7 роки тому
Max Brunsfeld
067d3f9681
Use parenthesized_expression in if, while, do statements
8 роки тому
Max Brunsfeld
82b62611b6
Differentiate primitive types from other type names
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
9e7706d922
Distinguish variables, types, fields and labels using renames
9 роки тому
Max Brunsfeld
39a662907b
Make a named node for argument lists in call expressions
9 роки тому
Max Brunsfeld
f4fca3e638
⬆️ tree-sitter, rename grammar_test to corpus
9 роки тому
Max Brunsfeld
c57b5a58f2
Fix malformed test that wasn't being run
10 роки тому
Max Brunsfeld
3695e0dfaf
Handle comma-separated expressions in for loops
10 роки тому
Max Brunsfeld
fa30191e88
Update grammar to use new tree-sitter API
Also, rewrite the way declarators are handled to produce a clearer AST
10 роки тому
Max Brunsfeld
9bc2e2e19f
Upgrade tree-sitter-compiler
11 роки тому
Max Brunsfeld
87ad2e9c69
Base grammar on existing C99 grammar
11 роки тому
Max Brunsfeld
11ce0da541
Add while statements
11 роки тому
Max Brunsfeld
9e566ff055
Add for statements, relational operators
11 роки тому
Max Brunsfeld
43ccfbd9fa
Add if-else statements
12 роки тому
Max Brunsfeld
fae81ec733
Add function calls, field access operators
12 роки тому