Add Rust macro call support in expressions

This commit is contained in:
Michael Netshipise 2026-01-19 22:17:02 +02:00
parent c457cfd878
commit 6c4e8d3d5e
2 changed files with 13 additions and 0 deletions

View File

@ -228,6 +228,7 @@ module.exports = grammar({
expression_path: ($) => expression_path: ($) =>
seq( seq(
$.identifier, $.identifier,
optional("!"), // Rust macro call
repeat( repeat(
choice( choice(
seq(".", $.identifier), seq(".", $.identifier),

View File

@ -1046,6 +1046,18 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "identifier" "name": "identifier"
}, },
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "BLANK"
}
]
},
{ {
"type": "REPEAT", "type": "REPEAT",
"content": { "content": {