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
f64152e441
feat: add `extension_expression`
1 year ago
Amaan Qureshi
0f1658320e
feat: support the `_Nonnull` clang attribute
1 year 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
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
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
8a41305cc0
feat: support C23 number suffixes
2 years ago
Amaan Qureshi
cd3915741e
feat: add K&R-style function definitions
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
3245131d7a
fix: optionally allow asm expressions after a declarator
2 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
2 years ago
Amaan Qureshi
6075c27545
feat: add `__thread` to storage_class
2 years ago
Amaan Qureshi
7b8332686e
chore: add tests
2 years ago
Amaan Qureshi
4b6e0bc97b
feat: add `attribute_specifier` to struct
2 years ago
Amaan Qureshi
349f3bb3f4
chore: generate & update test
2 years ago
Amaan Qureshi
5b08b70f2b
chore: update & add tests
2 years ago
Amaan Qureshi
60544dbdd2
Revert "fix: rework top level function definition pointer association"
This reverts commit eb6649e0c2 .
2 years ago
Amaan Qureshi
35595638e2
chore: add tests
2 years ago
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
2 years ago
Amaan Qureshi
c75868f8b5
feat: C23
2 years ago
Amaan Qureshi
bb4ab38847
feat: allow type_qualifiers after typedef specifier, alias char content
2 years ago
antoinemadec
7f678a26bb
Add else_clause
3 years ago
Amaan Qureshi
a726cb95ee
chore: add a test
2 years ago
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>
2 years ago
Benjamin Brownlee
693d298099
feat: add gnu inline asm syntax ( #140 )
2 years ago
Benjamin Brownlee
bb74560cd4
fix: allow preproc define without value to preceed a line with whitespace at start
3 years ago
Amaan Qureshi
f67789cdfd
chore: add some tests
2 years ago
Jason Brown
e1359a0a54
Adding support for offsetof
2 years ago
Amaan Qureshi
4f1a01d461
chore: add a test for the new features
3 years ago
Amaan Qureshi
a44d8c5ca5
chore: add a test for multi-backslash delimited comments
3 years ago