WolodiaM
d7f6648cc4
Added tests
il y a 4 semaines
Amaan Qureshi
f00bc3285f
fix: allow 1 character in hex escape sequences
il y a 1 an
Amaan Qureshi
9f850b2136
fix: allow type qualifiers after sized type specifiers
il y a 1 an
Amaan Qureshi
6c2cf5ed2b
fix: allow empty expression statements at the top level
il y a 1 an
Amaan Qureshi
f64152e441
feat: add `extension_expression`
il y a 1 an
Amaan Qureshi
0f1658320e
feat: support the `_Nonnull` clang attribute
il y a 1 an
Amaan Qureshi
8e6e28c340
fix: ternary consequences can have comma expressions
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
fea3dea7b9
feat: support missing gnu-style designated initializers
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
8e919ab298
feat: add `alignof_expression`
il y a 2 ans
Amaan Qureshi
f786a822b8
feat: add `__extension__`
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
7b8332686e
chore: add tests
il y a 3 ans
Amaan Qureshi
bb4ab38847
feat: allow type_qualifiers after typedef specifier, alias char content
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
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
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
calixteman
2ed529f075
Add u|U|u8 string|char support ( #36 )
il y a 6 ans
Max Brunsfeld
457a7917a1
Use new test structure, add syntax highlighting tests
il y a 6 ans
calixteman
c8061429cc
Fix error with ++L (consequence of support for L strings) ( #26 )
* Fix error with ++L (consequence of support for L strings)
* Update to tree-sitter 0.15.5
il y a 7 ans
Max Brunsfeld
c3965938cc
Add node fields, update tree-sitter-cli
il y a 7 ans
calixteman
ff4fc1c785
Handle L-strings and L-chars ( #25 )
il y a 7 ans
calixteman
2945de0173
Fix precedences of * (deref) and & (address-of) ( #21 )
il y a 7 ans
calixteman
adf868ce9a
Fix parenthesized expression on left side of assignment ( #22 )
il y a 7 ans
Calixte Denizet
338f99e8a0
Fix comment containing backslash
il y a 7 ans
Max Brunsfeld
fd42e75886
Flesh out number literal parsing
Fixes atom/language-c#323
il y a 7 ans
Max Brunsfeld
175d93b439
Handle postfix type qualifiers in compound literals
Fixes atom/language-c#312
il y a 7 ans
Max Brunsfeld
95b5710ff9
Allow number literals with 'f' suffix and digit separators
Fixes tree-sitter/tree-sitter-cpp#24
Fixes tree-sitter/tree-sitter-cpp#34
il y a 7 ans
Max Brunsfeld
1358e07759
Allow escaped newlines in single-line comments
Fixes tree-sitter/tree-sitter-cpp#26
il y a 7 ans
Max Brunsfeld
df769721cb
Parse escape sequences
il y a 8 ans
Max Brunsfeld
e8b6879820
Use repeat in initializer lists
il y a 8 ans
Max Brunsfeld
0c38b9f8c9
Handle identifier starting with 'false', 'true', etc
il y a 8 ans
Max Brunsfeld
82b62611b6
Differentiate primitive types from other type names
il y a 8 ans
Max Brunsfeld
f433b2bf8a
Tweak identifier naming convention
il y a 9 ans
Max Brunsfeld
66003e2afc
Rename type_clause -> type_descriptor and pull out the parens
il y a 9 ans
Max Brunsfeld
9e7706d922
Distinguish variables, types, fields and labels using renames
il y a 9 ans
Max Brunsfeld
42436c29ae
Allow simple abstract function declarators as in `sizeof(void * ())`
il y a 9 ans
Max Brunsfeld
39a662907b
Make a named node for argument lists in call expressions
il y a 9 ans
Max Brunsfeld
281e0cd60d
Add 'u' and 'l' suffixes on number literals
il y a 9 ans
Max Brunsfeld
8e8a968e3b
Fix handling of backslashes in string literals
il y a 9 ans
Max Brunsfeld
9b715a2620
Add concatenated strings
il y a 9 ans
Max Brunsfeld
fb51d81c99
Add comma expressions, make parenthesized expressions named rules
il y a 9 ans
Max Brunsfeld
be2676ed3e
Allow empty initializer lists
il y a 9 ans
Max Brunsfeld
f4fca3e638
⬆️ tree-sitter, rename grammar_test to corpus
il y a 9 ans