Amaan Qureshi
317e374655
feat: allow compound statements in parenthesized expressions
há 1 ano
Amaan Qureshi
069545cb72
feat: allow declarations in labeled statements
há 1 ano
Amaan Qureshi
77e57f5328
feat: support `__asm` in asm expressions
há 1 ano
Amaan Qureshi
0f1658320e
feat: support the `_Nonnull` clang attribute
há 1 ano
Amaan Qureshi
64483e84b1
refactor: unhide supertype nodes
há 2 anos
touzeauv
695779e82f
feat: support the `alignas` type qualifier
Co-authored-by: Valentin Touzeau <tree-sitter.github@valentintouzeau.fr>
há 2 anos
Amaan Qureshi
b8570770eb
feat: support `static` in array declarations
há 2 anos
Amaan Qureshi
c2b5837cd0
fix: remove the unnecessary `seq` around variadic_parameter
há 2 anos
Amaan Qureshi
1aafaff4d2
build: update bindings
há 2 anos
Valentin Touzeau
ff7f769c2d
fix: correctly handle preproc alternatives
This commit merges functions "elseBlock" and "elifBlock" in a single
function "alternativeBlock". Any call to either function is replaced by
a call to "alternativeBlock", which cover all alternatives (elif,
elifdef and else). The goal is twofold:
1) Correct the grammar to allow all kind of alternatives independently
of the "if" directive. Before the fix, "#if" alternative was
generated by elseBlock only, and thus disallow "#elifdef" as a
follow-up.
2) As a side effect, simplify the parser.
há 2 anos
Amaan Qureshi
e3f4c9507b
fix: ms call modifier missing in some spots
há 2 anos
Amaan Qureshi
579f349216
fix: allow ms pointer modifiers in abstract pointer declarators
há 2 anos
Amaan Qureshi
8e6e28c340
fix: ternary consequences can have comma expressions
há 2 anos
Amaan Qureshi
bac0e895ef
fix: asm strings can be concatenated
há 2 anos
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
{
...
}
```
há 2 anos
Lewis Russell
c325574f64
fix: improve concatenated_string
Now allows `<string> <identifier> ...` forms of concatenations.
há 2 anos
Brandon Wu
ecdd500806
fix: properly suffix elifdef
há 2 anos
Amaan Qureshi
34f4c7e751
fix: allow preproc calls in enumerator list items
há 2 anos
Amaan Qureshi
32067813ce
feat: allow preprocessor directives inside enumerator lists
há 2 anos
Amaan Qureshi
14c056841b
feat: multi-byte characters
há 2 anos
Riley Bruins
f0f5f1a269
fix: allow any position of sized type keywords
há 2 anos
Amaan Qureshi
fea3dea7b9
feat: support missing gnu-style designated initializers
há 2 anos
DennySun2100
25371f9448
feat: add Microsoft's SEH extension
Co-authored-by: Denny Sun <dennys@microsoft.com>
há 2 anos
Amaan Qureshi
978daf49f6
feat: allow `$` in identifiers
há 2 anos
Phil Turnbull
f1075f2d65
fix: `sizeof` precedence is incorrect
há 2 anos
Amaan Qureshi
e0c2274b48
fix: add old_style functions to block_item
há 2 anos
Amaan Qureshi
8a41305cc0
feat: support C23 number suffixes
há 2 anos
Amaan Qureshi
144dfb4a45
fix: number prefixes can be upper-case
há 2 anos
Amaan Qureshi
cd3915741e
feat: add K&R-style function definitions
há 2 anos
Amaan Qureshi
9933b50313
fix: rework rules to reduce state count
há 2 anos
Amaan Qureshi
287bcd2ca0
fix: add more variations of inline
há 2 anos
Amaan Qureshi
8e919ab298
feat: add `alignof_expression`
há 2 anos
Amaan Qureshi
9b00eeef7c
fix: allow an asm expression before attribute specifiers in function declarators
há 2 anos
Amaan Qureshi
f786a822b8
feat: add `__extension__`
há 2 anos
Amaan Qureshi
12a0993942
fix: type_definitions can have attribute_specifiers at the end
há 2 anos
Amaan Qureshi
08523da9d6
fix: allow string concatenations to start with an identifier
We do ensure at least one string is present though, otherwise conflicts arise
há 2 anos
Amaan Qureshi
39bea7d391
fix: remove unnecessary conflicts
há 3 anos
Amaan Qureshi
3245131d7a
fix: optionally allow asm expressions after a declarator
há 3 anos
Amaan Qureshi
d607e5e049
fix: allow matching bare slashes not succeeded by a `*` in `preproc_arg`
This fixes a slight regression when parsing a preproc function definition using division operators
há 3 anos
Amaan Qureshi
6075c27545
feat: add `__thread` to storage_class
há 3 anos
Amaan Qureshi
41c0a15e09
fix: make preproc newlines immediate so they don't span excess trailing newliens
há 3 anos
Amaan Qureshi
5890e77d2d
fix: disallow `/` after `\S` to better handle comments in preproc_arg
há 3 anos
Amaan Qureshi
f3559c6cb4
fix: swap precedences of assignnment and conditional expressions
`a *= b != c ? d : e;` is parsed incorrectly as a result
há 3 anos
Amaan Qureshi
4b6e0bc97b
feat: add `attribute_specifier` to struct
há 3 anos
Amaan Qureshi
4c49fc3883
fix: rework typedef specifiers again
há 3 anos
Amaan Qureshi
60544dbdd2
Revert "fix: rework top level function definition pointer association"
This reverts commit eb6649e0c2 .
há 3 anos
Amaan Qureshi
0ca9561fef
fix: mostly correct sized_type_specifiers in type definitions
há 3 anos
Amaan Qureshi
929e52f2d4
feat: add attribute_specifier to the end of struct, union, enum, and field_declaration
há 3 anos
Amaan Qureshi
1e6557a90d
fix: allow numbers in preproc_directive
há 3 anos
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
há 3 anos