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
Amaan Qureshi
34db9e4b29
fix: rework true top-level items to disallow binary expressions
This resolves conflicts with declarations that can be interpreted as binary_expressions
há 3 anos
Amaan Qureshi
c75868f8b5
feat: C23
há 3 anos
Amaan Qureshi
bb4ab38847
feat: allow type_qualifiers after typedef specifier, alias char content
há 3 anos
antoinemadec
7f678a26bb
Add else_clause
há 3 anos
TJ DeVries
6b85e8478b
fix: Add compound statement to call expression
há 5 anos
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>
há 3 anos
Benjamin Brownlee
693d298099
feat: add gnu inline asm syntax ( #140 )
há 3 anos
Benjamin Brownlee
bb74560cd4
fix: allow preproc define without value to preceed a line with whitespace at start
há 3 anos
Amaan Qureshi
5b5367c4b8
feat: add underlying types in enums, allow bitfield clauses in repeated field declarators
há 3 anos
Jason Brown
e1359a0a54
Adding support for offsetof
há 3 anos
Amaan Qureshi
20fee37fd0
feat: add _Generic expressions and missing type qualifiers
_Generic is a C11 feature, __restrict__ and _Noreturn were added to type_qualifiers
há 3 anos
Amaan Qureshi
c0b1db960d
feat: add and apply eslint formatting
há 3 anos
Amaan Qureshi
b906e05ba4
docs: document grammar.js
há 3 anos
Amaan Qureshi
16456ce9a1
fix: comments can have multiple delimiting backslashes
há 3 anos
Amaan Qureshi
d4a789bf07
feat: support omitting consequences in conditional expressions
It's allowed in gcc and clang
há 3 anos
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)
há 3 anos
Ismail A Bella
94bc261b1a
fix: allow multiple expressions inside for_statement condition
há 4 anos
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.
há 4 anos
Ben Dunkin
517bf92b2c
add the body label to for loops to make it the same as other loops ( #110 )
há 4 anos
John Drouhard
f71e80b9f2
Extract "..." into a named node called variadic_parameter. Fixes #73
há 4 anos
jdrouhard
9bee34500c
Support attribute statements under case statements ( #83 )
há 4 anos
John Drouhard
0aeed5578a
Fix indent-level whitespace
há 4 anos