Amaan Qureshi
ae3809f0a6
fix: allow the output operand value to be an expression
1 год назад
touzeauv
695779e82f
feat: support the `alignas` type qualifier
Co-authored-by: Valentin Touzeau <tree-sitter.github@valentintouzeau.fr>
2 лет назад
Amaan Qureshi
b8570770eb
feat: support `static` in array declarations
2 лет назад
Amaan Qureshi
579f349216
fix: allow ms pointer modifiers in abstract pointer declarators
2 лет назад
Amaan Qureshi
bac0e895ef
fix: asm strings can be concatenated
2 лет назад
Lewis Russell
c706154d29
fix: allow function definitions to contain preproc attributes
Specifically for Neovim which contains code like:
```c
Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Arena *arena, Error *err)
FUNC_API_SINCE(8) FUNC_API_FAST
{
...
}
```
2 лет назад
Amaan Qureshi
32067813ce
feat: allow preprocessor directives inside enumerator lists
2 лет назад
Amaan Qureshi
14c056841b
feat: multi-byte characters
2 лет назад
Riley Bruins
f0f5f1a269
fix: allow any position of sized type keywords
2 лет назад
Amaan Qureshi
cd3915741e
feat: add K&R-style function definitions
2 лет назад
Amaan Qureshi
9b00eeef7c
fix: allow an asm expression before attribute specifiers in function declarators
2 лет назад
Amaan Qureshi
f786a822b8
feat: add `__extension__`
2 лет назад
Amaan Qureshi
12a0993942
fix: type_definitions can have attribute_specifiers at the end
2 лет назад
Amaan Qureshi
3245131d7a
fix: optionally allow asm expressions after a declarator
3 лет назад
Amaan Qureshi
6075c27545
feat: add `__thread` to storage_class
3 лет назад
Amaan Qureshi
4b6e0bc97b
feat: add `attribute_specifier` to struct
3 лет назад
Amaan Qureshi
349f3bb3f4
chore: generate & update test
3 лет назад
Amaan Qureshi
5b08b70f2b
chore: update & add tests
3 лет назад
Amaan Qureshi
60544dbdd2
Revert "fix: rework top level function definition pointer association"
This reverts commit eb6649e0c2 .
3 лет назад
Amaan Qureshi
eb6649e0c2
fix: rework top level function definition pointer association
Previously, pointers were associated with the function identifier, now they're associated with the return type
3 лет назад
Amaan Qureshi
c75868f8b5
feat: C23
3 лет назад
Amaan Qureshi
bb4ab38847
feat: allow type_qualifiers after typedef specifier, alias char content
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
f67789cdfd
chore: add some tests
3 лет назад
John Drouhard
f71e80b9f2
Extract "..." into a named node called variadic_parameter. Fixes #73
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
0bc1adf0c2
Tweak fields
7 лет назад
Max Brunsfeld
c3965938cc
Add node fields, update tree-sitter-cli
7 лет назад
calixteman
fb9fbd83f0
Handle __attribute__ in function declaration ( #19 )
* Handle __attribute__ in function declaration
* Fix tests in examples/
* Remove useless optional
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
7f827b42a8
Add explicit nodes for bitfield clauses
7 лет назад
Max Brunsfeld
ed56d5e288
Fix array declarator parsing
Refs https://github.com/atom/atom/issues/18346#issuecomment-433734281
7 лет назад
Max Brunsfeld
f8cab65c3a
Allow type qualifier lists in pointer declarators
Fixes tree-sitter/tree-sitter-cpp#7
8 лет назад
Max Brunsfeld
95b1b4315e
Add _Atomic and restrict type qualifiers
8 лет назад
Max Brunsfeld
1e1f7c9cf8
Parse typedef names as type_identifiers
8 лет назад
Max Brunsfeld
82b62611b6
Differentiate primitive types from other type names
8 лет назад
Max Brunsfeld
c4ed85b79b
Call inline a storage class specifier like static
8 лет назад
Max Brunsfeld
f433b2bf8a
Tweak identifier naming convention
9 лет назад
Max Brunsfeld
9e7706d922
Distinguish variables, types, fields and labels using renames
9 лет назад
Max Brunsfeld
eb82660b87
Generalize the ordering of type and declaration specifiers
9 лет назад
Max Brunsfeld
ab0162ce37
Make member_declaration_list its own rule
9 лет назад
Max Brunsfeld
f3ea61c8fe
Add C++ linkage specifiers, since they appear in .h files
9 лет назад
Max Brunsfeld
367cd73ee2
Allow unsigned, short, etc to be their own types
9 лет назад
Max Brunsfeld
f4fca3e638
⬆️ tree-sitter, rename grammar_test to corpus
9 лет назад
Max Brunsfeld
f9a1ffa413
Add function-like macros as type specifiers
10 лет назад
Max Brunsfeld
9e4d077996
Add varargs function declarations
10 лет назад
Max Brunsfeld
d6d31778ba
Allow trailing commas in enum specifiers
10 лет назад