Amaan Qureshi
34f4c7e751
fix: allow preproc calls in enumerator list items
2 年之前
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
e0c2274b48
fix: add old_style functions to block_item
2 年之前
Amaan Qureshi
8a41305cc0
feat: support C23 number suffixes
2 年之前
Amaan Qureshi
144dfb4a45
fix: number prefixes can be upper-case
2 年之前
Amaan Qureshi
cd3915741e
feat: add K&R-style function definitions
2 年之前
Amaan Qureshi
9933b50313
fix: rework rules to reduce state count
2 年之前
Amaan Qureshi
287bcd2ca0
fix: add more variations of inline
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
39bea7d391
fix: remove unnecessary conflicts
3 年之前
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
41c0a15e09
fix: make preproc newlines immediate so they don't span excess trailing newliens
3 年之前
Amaan Qureshi
5890e77d2d
fix: disallow `/` after `\S` to better handle comments in preproc_arg
3 年之前
Amaan Qureshi
f3559c6cb4
fix: swap precedences of assignnment and conditional expressions
`a *= b != c ? d : e;` is parsed incorrectly as a result
3 年之前
Amaan Qureshi
4b6e0bc97b
feat: add `attribute_specifier` to struct
3 年之前
Amaan Qureshi
4c49fc3883
fix: rework typedef specifiers again
3 年之前
Amaan Qureshi
60544dbdd2
Revert "fix: rework top level function definition pointer association"
This reverts commit eb6649e0c2 .
3 年之前
Amaan Qureshi
0ca9561fef
fix: mostly correct sized_type_specifiers in type definitions
3 年之前
Amaan Qureshi
929e52f2d4
feat: add attribute_specifier to the end of struct, union, enum, and field_declaration
3 年之前
Amaan Qureshi
1e6557a90d
fix: allow numbers in preproc_directive
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
34db9e4b29
fix: rework true top-level items to disallow binary expressions
This resolves conflicts with declarations that can be interpreted as binary_expressions
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 年之前
TJ DeVries
6b85e8478b
fix: Add compound statement to call expression
5 年之前
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
5b5367c4b8
feat: add underlying types in enums, allow bitfield clauses in repeated field declarators
3 年之前
Jason Brown
e1359a0a54
Adding support for offsetof
3 年之前
Amaan Qureshi
20fee37fd0
feat: add _Generic expressions and missing type qualifiers
_Generic is a C11 feature, __restrict__ and _Noreturn were added to type_qualifiers
3 年之前
Amaan Qureshi
c0b1db960d
feat: add and apply eslint formatting
3 年之前
Amaan Qureshi
b906e05ba4
docs: document grammar.js
3 年之前
Amaan Qureshi
16456ce9a1
fix: comments can have multiple delimiting backslashes
3 年之前
Amaan Qureshi
d4a789bf07
feat: support omitting consequences in conditional expressions
It's allowed in gcc and clang
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 年之前
Ismail A Bella
94bc261b1a
fix: allow multiple expressions inside for_statement condition
4 年之前