Amaan Qureshi
464e8d9093
build: bump `tree-sitter-c` to 0.23.1
1 vuosi sitten
John Drouhard
0fc8c8cc42
lambda expressions: support capture syntax through cpp20
1 vuosi sitten
Amaan Qureshi
bd79fd85b5
feat: allow semicolon in field declaration list items
1 vuosi sitten
Amaan Qureshi
9e4e96d02d
feat: add `raw_string_literal` to `_string`
1 vuosi sitten
Amaan Qureshi
bbdcda025d
feat: support `constexpr`-prefixed friend declarations
1 vuosi sitten
Amaan Qureshi
9b0d46ab86
fix: do not give higher precedence to a token `0`
1 vuosi sitten
Amaan Qureshi
d6eba4f3d8
fix: inline the `virtual` node
1 vuosi sitten
Amaan Qureshi
7bb212b9f3
feat: bump tree-sitter-c to 0.23.0
1 vuosi sitten
Valentin Touzeau
f86f2ae102
Fix ambiguity between template and comparison
2 vuotta sitten
Amaan Qureshi
6ca758cff9
feat: bump C grammar
2 vuotta sitten
Amaan Qureshi
c51ffe9d7b
fix: remove `choice` wrapper around 'virtual'
2 vuotta sitten
Amaan Qureshi
f8efc57abe
feat: support reference declarators in types
2 vuotta sitten
Amaan Qureshi
60d357fc70
feat: add optional attribute declarations after 'namespace'
2 vuotta sitten
Amaan Qureshi
1c3c93d727
feat: support pure virtual destructors
2 vuotta sitten
Amaan Qureshi
aa79a170c6
fix: specifier and virtual do not strictly require each other
2 vuotta sitten
ObserverOfTime
075886a9fb
ci: update workflows
and move eslint config to package.json
2 vuotta sitten
ObserverOfTime
dc564d2d32
build: update bindings
2 vuotta sitten
Amaan Qureshi
d51470929e
fix: allow qualified identifiers in field expressions
2 vuotta sitten
Amaan Qureshi
1ef1791b3c
fix: give for statement bodies a higher `dynamic` precedence to avoid parse errors
2 vuotta sitten
Amaan Qureshi
bbde8cd9c5
chore: update tree-sitter-c
2 vuotta sitten
Amaan Qureshi
2e4d27f772
fix: hide aliased rule
2 vuotta sitten
Brandon Wu
4ca37be8e7
disambiguate fold vs parenthesized assignment ( #239 )
2 vuotta sitten
Amaan Qureshi
3deebb6635
fix: abstrace reference declarators in parameters
2 vuotta sitten
Amaan Qureshi
16874f1fea
chore: bump tree-sitter-c to 0.20.7
2 vuotta sitten
Ben Deane
a90f170f92
refactor: rewrite `number_literal`
Addresses #224 and properly parses all C++ numbers.
2 vuotta sitten
Amaan Qureshi
5cf9c8032b
fix: rework some rules to reduce state count
2 vuotta sitten
Amaan Qureshi
9cc21dd5d5
fix: allow template before identifier in qualified_identifier
2 vuotta sitten
Amaan Qureshi
345c85ec9f
fix: allow user defined literals in assignment lhs
2 vuotta sitten
Amaan Qureshi
fdb6dfc6f4
feat: bump tree-sitter-c to 0.20.5 and update grammar accordingly
2 vuotta sitten
Ben Deane
9692f069b9
Support dependent operator templates
This change allows operators (not just fields/member functions) as dependent
template expressions.
```cpp
auto x = y.template operator()<int>();
```
This syntax is used e.g. to call C++20 lambda expressions with a template head
where the template arguments are not function arguments and therefore cannot be
deduced.
```cpp
[]<typename> () {}.template operator()<int>();
```
2 vuotta sitten
Ben Deane
472002f3bf
Support multidimensional subscripts
This change allows commas inside subscripts.
```cpp
auto x = a[1, 2, 3];
```
From C++23, array subscripts work like arguments to `operator[]` as an n-ary
function.
Before C++23, `operator[]` must be a unary function, but before C++20, it's
possible to use the comma operator inside subscript expressions - and this is
done in libraries that use expression templates to achieve multidimensional
array syntax.
Use of the comma operator in subscript expressions was deprecated in C++20 to
make way for the C++23 change to n-ary `operator[]`.
2 vuotta sitten
Amaan Qureshi
81e46a7376
chore: remove unnecessary conflicts
3 vuotta sitten
Amaan Qureshi
ba1f79fb1d
fix: allow `attribute_specifier` after `noexcept`
3 vuotta sitten
Amaan Qureshi
c7dd622e7a
feat: add `alignas_specifier` and `alignof_expression`
3 vuotta sitten
Amaan Qureshi
e99ad99231
fix: allow pointer declarators in qualified identifiers & `.*` in field expressions
3 vuotta sitten
Amaan Qureshi
dbc1e2baac
fix: initializer lists can be the RHS of an assignment expression
3 vuotta sitten
Amaan Qureshi
3c898ed3f0
fix: backport `attribute_specifier` fixes from C
3 vuotta sitten
Amaan Qureshi
eba14809da
fix: primitive types are allowed in compound literal expressions
3 vuotta sitten
Amaan Qureshi
7ce69cb41d
fix: remove `_typedef_type_specifier`, use git version of tree-sitter-c
3 vuotta sitten
Amaan Qureshi
0dd318d271
fix: update `if_statement` to align with C
3 vuotta sitten
Amaan Qureshi
03aec3de1f
chore: update C to v0.20.3
3 vuotta sitten
Amaan Qureshi
bef54737be
feat: add eslint formatting
3 vuotta sitten
John Drouhard
670404d7c6
feat: support template friend declarations
3 vuotta sitten
John Drouhard
0b6d0eb9ab
feat!: namespace rule tweaks
breaking change: namespace_definition_name has been renamed to
nested_namespace_specifier and the nesting has been reversed to match
the way normal scope resolution works elsewhere.
identifiers that are part of a namespace_definition are now
namespace_identifier, which matches the identifier node type used in
scope resolution for qualified types.
namespace alias definitions use the new nested_namespace_specifier so
all identifiers are namespace_identifier nodes.
support for top-level "inline" namespace declarations (which are valid
if they are nested in another namespace body).
3 vuotta sitten
Amaan Qureshi
af15a5260b
feat: add missing fold operators ( #195 )
3 vuotta sitten
John Drouhard
03fa93db13
support alternate logical operators (and/or) in requires clauses
Fixes #193
3 vuotta sitten
John Drouhard
56cec4c2eb
feat!: support virtual inheritance
breaking changes:
- access_specifier is now a named node in base class clauses
- virtual_function_specifier node has been renamed to virtual
3 vuotta sitten
John Drouhard
5e9f44f632
reduce state count a bit more for function declarations; fix a few places where attributes can appear
3 vuotta sitten
John Drouhard
bc8809507a
reduce parse state count by combining class/struct/union declarations into one anonymous rule
3 vuotta sitten
John Drouhard
20beae977e
change function declarator to more accurately parse all the possible components
Fixes #184
3 vuotta sitten