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