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)
vor 3 Jahren
calixteman
2ed529f075
Add u|U|u8 string|char support ( #36 )
vor 6 Jahren
Max Brunsfeld
457a7917a1
Use new test structure, add syntax highlighting tests
vor 6 Jahren
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
vor 7 Jahren
Max Brunsfeld
c3965938cc
Add node fields, update tree-sitter-cli
vor 7 Jahren
calixteman
ff4fc1c785
Handle L-strings and L-chars ( #25 )
vor 7 Jahren
calixteman
2945de0173
Fix precedences of * (deref) and & (address-of) ( #21 )
vor 7 Jahren
calixteman
adf868ce9a
Fix parenthesized expression on left side of assignment ( #22 )
vor 7 Jahren
Calixte Denizet
338f99e8a0
Fix comment containing backslash
vor 7 Jahren
Max Brunsfeld
fd42e75886
Flesh out number literal parsing
Fixes atom/language-c#323
vor 7 Jahren
Max Brunsfeld
175d93b439
Handle postfix type qualifiers in compound literals
Fixes atom/language-c#312
vor 7 Jahren
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
vor 7 Jahren
Max Brunsfeld
1358e07759
Allow escaped newlines in single-line comments
Fixes tree-sitter/tree-sitter-cpp#26
vor 7 Jahren
Max Brunsfeld
df769721cb
Parse escape sequences
vor 8 Jahren
Max Brunsfeld
e8b6879820
Use repeat in initializer lists
vor 8 Jahren
Max Brunsfeld
0c38b9f8c9
Handle identifier starting with 'false', 'true', etc
vor 8 Jahren
Max Brunsfeld
82b62611b6
Differentiate primitive types from other type names
vor 8 Jahren
Max Brunsfeld
f433b2bf8a
Tweak identifier naming convention
vor 9 Jahren
Max Brunsfeld
66003e2afc
Rename type_clause -> type_descriptor and pull out the parens
vor 9 Jahren
Max Brunsfeld
9e7706d922
Distinguish variables, types, fields and labels using renames
vor 9 Jahren
Max Brunsfeld
42436c29ae
Allow simple abstract function declarators as in `sizeof(void * ())`
vor 9 Jahren
Max Brunsfeld
39a662907b
Make a named node for argument lists in call expressions
vor 9 Jahren
Max Brunsfeld
281e0cd60d
Add 'u' and 'l' suffixes on number literals
vor 9 Jahren
Max Brunsfeld
8e8a968e3b
Fix handling of backslashes in string literals
vor 9 Jahren
Max Brunsfeld
9b715a2620
Add concatenated strings
vor 9 Jahren
Max Brunsfeld
fb51d81c99
Add comma expressions, make parenthesized expressions named rules
vor 9 Jahren
Max Brunsfeld
be2676ed3e
Allow empty initializer lists
vor 9 Jahren
Max Brunsfeld
f4fca3e638
⬆️ tree-sitter, rename grammar_test to corpus
vor 9 Jahren
Max Brunsfeld
f9a1ffa413
Add function-like macros as type specifiers
vor 10 Jahren
Max Brunsfeld
8190b6ea7f
Add hexadecimal, binary and unsigned integer literals
vor 10 Jahren
Max Brunsfeld
fa30191e88
Update grammar to use new tree-sitter API
Also, rewrite the way declarators are handled to produce a clearer AST
vor 10 Jahren
Max Brunsfeld
9bc2e2e19f
Upgrade tree-sitter-compiler
vor 10 Jahren
Max Brunsfeld
280ff87fd0
Use latest tree-sitter-compiler
vor 11 Jahren
Max Brunsfeld
6775e737a6
Fix error in sizeof expressions
vor 11 Jahren
Max Brunsfeld
87ad2e9c69
Base grammar on existing C99 grammar
vor 11 Jahren
Max Brunsfeld
e1871c5213
Allow identifiers starting w/ underscores
vor 11 Jahren
Max Brunsfeld
cdb08d5aff
Add math assignment operators
vor 11 Jahren
Max Brunsfeld
81d2af76bd
Add subscript operator
vor 11 Jahren
Max Brunsfeld
845921d558
Add storage classes to function defs
vor 11 Jahren
Max Brunsfeld
261237e6c6
0.0.1
vor 11 Jahren
Max Brunsfeld
9964b428fd
Add pointer operations
vor 11 Jahren
Max Brunsfeld
ebd581c2bd
Add compound literals
vor 11 Jahren
Max Brunsfeld
5c22801870
Add char literals
vor 11 Jahren
Max Brunsfeld
a2c90643d7
Add assignments
vor 12 Jahren
Max Brunsfeld
1c229674d7
Add math and boolean operators
vor 12 Jahren
Max Brunsfeld
fae81ec733
Add function calls, field access operators
vor 12 Jahren