Amaan Qureshi
e3f4c9507b
fix: ms call modifier missing in some spots
il y a 2 ans
Amaan Qureshi
579f349216
fix: allow ms pointer modifiers in abstract pointer declarators
il y a 2 ans
Amaan Qureshi
8e6e28c340
fix: ternary consequences can have comma expressions
il y a 2 ans
Amaan Qureshi
bac0e895ef
fix: asm strings can be concatenated
il y a 2 ans
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
{
...
}
```
il y a 2 ans
Lewis Russell
c325574f64
fix: improve concatenated_string
Now allows `<string> <identifier> ...` forms of concatenations.
il y a 2 ans
Amaan Qureshi
32067813ce
feat: allow preprocessor directives inside enumerator lists
il y a 2 ans
Amaan Qureshi
14c056841b
feat: multi-byte characters
il y a 2 ans
Riley Bruins
f0f5f1a269
fix: allow any position of sized type keywords
il y a 2 ans
Amaan Qureshi
fea3dea7b9
feat: support missing gnu-style designated initializers
il y a 2 ans
DennySun2100
25371f9448
feat: add Microsoft's SEH extension
Co-authored-by: Denny Sun <dennys@microsoft.com>
il y a 2 ans
Amaan Qureshi
978daf49f6
feat: allow `$` in identifiers
il y a 2 ans
Phil Turnbull
f1075f2d65
fix: `sizeof` precedence is incorrect
il y a 2 ans
Amaan Qureshi
8a41305cc0
feat: support C23 number suffixes
il y a 2 ans
Amaan Qureshi
cd3915741e
feat: add K&R-style function definitions
il y a 2 ans
Amaan Qureshi
8e919ab298
feat: add `alignof_expression`
il y a 2 ans
Amaan Qureshi
9b00eeef7c
fix: allow an asm expression before attribute specifiers in function declarators
il y a 2 ans
Amaan Qureshi
f786a822b8
feat: add `__extension__`
il y a 2 ans
Amaan Qureshi
12a0993942
fix: type_definitions can have attribute_specifiers at the end
il y a 2 ans
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
il y a 2 ans
Amaan Qureshi
3245131d7a
fix: optionally allow asm expressions after a declarator
il y a 3 ans
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
il y a 3 ans
Amaan Qureshi
6075c27545
feat: add `__thread` to storage_class
il y a 3 ans
Amaan Qureshi
7b8332686e
chore: add tests
il y a 3 ans
Amaan Qureshi
4b6e0bc97b
feat: add `attribute_specifier` to struct
il y a 3 ans
Amaan Qureshi
349f3bb3f4
chore: generate & update test
il y a 3 ans
Amaan Qureshi
5b08b70f2b
chore: update & add tests
il y a 3 ans
Amaan Qureshi
60544dbdd2
Revert "fix: rework top level function definition pointer association"
This reverts commit eb6649e0c2 .
il y a 3 ans
Amaan Qureshi
35595638e2
chore: add tests
il y a 3 ans
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
il y a 3 ans
Amaan Qureshi
c75868f8b5
feat: C23
il y a 3 ans
Amaan Qureshi
bb4ab38847
feat: allow type_qualifiers after typedef specifier, alias char content
il y a 3 ans
antoinemadec
7f678a26bb
Add else_clause
il y a 3 ans
Amaan Qureshi
a726cb95ee
chore: add a test
il y a 3 ans
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>
il y a 3 ans
Benjamin Brownlee
693d298099
feat: add gnu inline asm syntax ( #140 )
il y a 3 ans
Benjamin Brownlee
bb74560cd4
fix: allow preproc define without value to preceed a line with whitespace at start
il y a 3 ans
Amaan Qureshi
f67789cdfd
chore: add some tests
il y a 3 ans
Jason Brown
e1359a0a54
Adding support for offsetof
il y a 3 ans
Amaan Qureshi
4f1a01d461
chore: add a test for the new features
il y a 3 ans
Amaan Qureshi
a44d8c5ca5
chore: add a test for multi-backslash delimited comments
il y a 3 ans
Jade Lovelace
93135e2eb5
fix: implement Unicode identifiers
According to cppreference, identifiers are `(XID_Start | '_')
XID_Continue*`, which is the case as of C++23 and C2x. I have confirmed
this myself with the drafts of C++23 and C2x.
https://en.cppreference.com/w/cpp/language/identifiers
Clang indeed implements identifiers as `(XID_Start | '_') XID_Continue*`
in C++ mode and C2x mode, with a slight extension to the character set
to include some extra math characters:
231992d9b8/clang/lib/Lex/Lexer.cpp (L1517-L1530)
il y a 3 ans
John Drouhard
0720f9c2af
Add test for comma expression in iteration expression
il y a 4 ans
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.
il y a 4 ans
Ben Dunkin
517bf92b2c
add the body label to for loops to make it the same as other loops ( #110 )
il y a 4 ans
John Drouhard
f71e80b9f2
Extract "..." into a named node called variadic_parameter. Fixes #73
il y a 4 ans
jdrouhard
9bee34500c
Support attribute statements under case statements ( #83 )
il y a 4 ans
John Drouhard
0b714a5134
rename attribute_definition to attribute_declaration
il y a 4 ans
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
il y a 4 ans
Mathieu Nayrolles
88592f162e
Add support for Microsoft-specific modifiers ( #40 )
* Add support for Microsoft-specific modifiers
Microsoft-specific modifiers are keywords can be used to modify declarators to form derived types.
The specification for the modifiers themselves is here:
https://docs.microsoft.com/en-us/cpp/cpp/microsoft-specific-modifiers?view=vs-2019
* 0.16.1
il y a 6 ans