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