John Drouhard
f333471ec3
export helper functions for reuse in cpp grammar
1 year ago
Amaan Qureshi
3aa2995549
fix: always ensure K&R functions have at least 1 declaration
1 year ago
Amaan Qureshi
ce715d70a0
fix: support `__attribute`
1 year ago
Amaan Qureshi
ae3809f0a6
fix: allow the output operand value to be an expression
1 year ago
Amaan Qureshi
f00bc3285f
fix: allow 1 character in hex escape sequences
1 year ago
Amaan Qureshi
9f850b2136
fix: allow type qualifiers after sized type specifiers
1 year ago
Amaan Qureshi
6c2cf5ed2b
fix: allow empty expression statements at the top level
1 year ago
Amaan Qureshi
7faf8e8e7e
feat: migrate to `eslint-config-treesitter`
1 year ago
Amaan Qureshi
b76457304d
feat: allow attribute specifers after a parameter's declarator
1 year ago
Amaan Qureshi
975466d539
feat: allow `__volatile__` in asm qualifiers
1 year ago
Amaan Qureshi
f64152e441
feat: add `extension_expression`
1 year ago
Amaan Qureshi
317e374655
feat: allow compound statements in parenthesized expressions
1 year ago
Amaan Qureshi
069545cb72
feat: allow declarations in labeled statements
1 year ago
Amaan Qureshi
77e57f5328
feat: support `__asm` in asm expressions
1 year ago
Amaan Qureshi
0f1658320e
feat: support the `_Nonnull` clang attribute
1 year ago
Amaan Qureshi
64483e84b1
refactor: unhide supertype nodes
2 years ago
touzeauv
695779e82f
feat: support the `alignas` type qualifier
Co-authored-by: Valentin Touzeau <tree-sitter.github@valentintouzeau.fr>
2 years ago
Amaan Qureshi
b8570770eb
feat: support `static` in array declarations
2 years ago
Amaan Qureshi
c2b5837cd0
fix: remove the unnecessary `seq` around variadic_parameter
2 years ago
Amaan Qureshi
1aafaff4d2
build: update bindings
2 years ago
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.
2 years ago
Amaan Qureshi
e3f4c9507b
fix: ms call modifier missing in some spots
2 years ago
Amaan Qureshi
579f349216
fix: allow ms pointer modifiers in abstract pointer declarators
2 years ago
Amaan Qureshi
8e6e28c340
fix: ternary consequences can have comma expressions
2 years ago
Amaan Qureshi
bac0e895ef
fix: asm strings can be concatenated
2 years ago
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 years ago
Lewis Russell
c325574f64
fix: improve concatenated_string
Now allows `<string> <identifier> ...` forms of concatenations.
2 years ago
Brandon Wu
ecdd500806
fix: properly suffix elifdef
2 years ago
Amaan Qureshi
34f4c7e751
fix: allow preproc calls in enumerator list items
2 years ago
Amaan Qureshi
32067813ce
feat: allow preprocessor directives inside enumerator lists
2 years ago
Amaan Qureshi
14c056841b
feat: multi-byte characters
2 years ago
Riley Bruins
f0f5f1a269
fix: allow any position of sized type keywords
2 years ago
Amaan Qureshi
fea3dea7b9
feat: support missing gnu-style designated initializers
2 years ago
DennySun2100
25371f9448
feat: add Microsoft's SEH extension
Co-authored-by: Denny Sun <dennys@microsoft.com>
2 years ago
Amaan Qureshi
978daf49f6
feat: allow `$` in identifiers
2 years ago
Phil Turnbull
f1075f2d65
fix: `sizeof` precedence is incorrect
2 years ago
Amaan Qureshi
e0c2274b48
fix: add old_style functions to block_item
2 years ago
Amaan Qureshi
8a41305cc0
feat: support C23 number suffixes
2 years ago
Amaan Qureshi
144dfb4a45
fix: number prefixes can be upper-case
2 years ago
Amaan Qureshi
cd3915741e
feat: add K&R-style function definitions
2 years ago
Amaan Qureshi
9933b50313
fix: rework rules to reduce state count
2 years ago
Amaan Qureshi
287bcd2ca0
fix: add more variations of inline
2 years ago
Amaan Qureshi
8e919ab298
feat: add `alignof_expression`
2 years ago
Amaan Qureshi
9b00eeef7c
fix: allow an asm expression before attribute specifiers in function declarators
2 years ago
Amaan Qureshi
f786a822b8
feat: add `__extension__`
2 years ago
Amaan Qureshi
12a0993942
fix: type_definitions can have attribute_specifiers at the end
2 years ago
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
2 years ago
Amaan Qureshi
39bea7d391
fix: remove unnecessary conflicts
3 years ago
Amaan Qureshi
3245131d7a
fix: optionally allow asm expressions after a declarator
3 years ago
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
3 years ago