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 години