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
fea3dea7b9
feat: support missing gnu-style designated initializers
2 年之前
DennySun2100
25371f9448
feat: add Microsoft's SEH extension
Co-authored-by: Denny Sun <dennys@microsoft.com>
2 年之前
Amaan Qureshi
978daf49f6
feat: allow `$` in identifiers
2 年之前
Phil Turnbull
f1075f2d65
fix: `sizeof` precedence is incorrect
2 年之前
Amaan Qureshi
8a41305cc0
feat: support C23 number suffixes
2 年之前
Amaan Qureshi
cd3915741e
feat: add K&R-style function definitions
2 年之前
Amaan Qureshi
8e919ab298
feat: add `alignof_expression`
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
08523da9d6
fix: allow string concatenations to start with an identifier
We do ensure at least one string is present though, otherwise conflicts arise
2 年之前
Amaan Qureshi
3245131d7a
fix: optionally allow asm expressions after a declarator
3 年之前
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 年之前
Amaan Qureshi
6075c27545
feat: add `__thread` to storage_class
3 年之前
Amaan Qureshi
7b8332686e
chore: add tests
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
35595638e2
chore: add tests
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 年之前
antoinemadec
7f678a26bb
Add else_clause
3 年之前
Amaan Qureshi
a726cb95ee
chore: add a test
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 年之前
Benjamin Brownlee
693d298099
feat: add gnu inline asm syntax ( #140 )
3 年之前
Benjamin Brownlee
bb74560cd4
fix: allow preproc define without value to preceed a line with whitespace at start
3 年之前
Amaan Qureshi
f67789cdfd
chore: add some tests
3 年之前
Jason Brown
e1359a0a54
Adding support for offsetof
3 年之前
Amaan Qureshi
4f1a01d461
chore: add a test for the new features
3 年之前
Amaan Qureshi
a44d8c5ca5
chore: add a test for multi-backslash delimited comments
3 年之前
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)
3 年之前
John Drouhard
0720f9c2af
Add test for comma expression in iteration expression
4 年之前
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.
4 年之前
Ben Dunkin
517bf92b2c
add the body label to for loops to make it the same as other loops ( #110 )
4 年之前
John Drouhard
f71e80b9f2
Extract "..." into a named node called variadic_parameter. Fixes #73
4 年之前
jdrouhard
9bee34500c
Support attribute statements under case statements ( #83 )
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 年之前
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
6 年之前
calixteman
c455818961
#include can be followed by a macro name or a macro call ( #38 )
* #include can be followed by a macro name or a macro call
* In preproc_include, use preproc_call_expression
6 年之前
calixteman
d2ebd7f6c0
Macro definition can contain continuation line in the argument list ( #28 )
* Macro definition can contain continuation line in the argument list
* Reset grammar since line continuations are handled globally
Preserve the test.
6 年之前
calixteman
362c031880
Parse expressions in preprocessor #if statement ( #29 )
* Parse expressions in preprocessor #if statement
* Make preproc_expression look like a normal expression
* Hide the wrapper rules
* Alias the rulres to match their corresponding expression rule
* Handle line continuations as extra tokens
6 年之前
calixteman
2ed529f075
Add u|U|u8 string|char support ( #36 )
6 年之前
Max Brunsfeld
d101ad1c83
Improve highlighting query
6 年之前
Max Brunsfeld
457a7917a1
Use new test structure, add syntax highlighting tests
6 年之前