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
пре 10 година
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 година