tree-sitter-cpp icon indicating copy to clipboard operation
tree-sitter-cpp copied to clipboard

Attribute syntax TODO: support using

Open elbeno opened this issue 2 years ago • 1 comments

Since C++17, attributes can have using in them:

[[using name::space: attr]]

Also (this is admittedly strange) the C++ grammar doesn't introduce an attribute with a single [[ token but with two tokens [ [. (Yes, this means it's really annoying to call an immediately-invoked lambda inside a call to operator[]).

elbeno avatar Aug 10 '23 04:08 elbeno

The given example is invalid, attribute-namespaces must be identifiers (dcl.attr.grammar), therefore scope resolution operators may not appear in an attribute-namespace.

Anyway, https://github.com/tree-sitter/tree-sitter-cpp/pull/278 implements this.

Tsche avatar Aug 05 '24 21:08 Tsche