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
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 年之前