feat: add namespaced identifiers

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
This commit is contained in:
Michael Hoffmann
2024-06-23 08:19:49 +02:00
parent 422cbe1d93
commit 9e3ec9848f
6 changed files with 1006 additions and 935 deletions

View File

@@ -143,6 +143,10 @@
{
"type": "STRING",
"value": "-"
},
{
"type": "STRING",
"value": "::"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -52,7 +52,7 @@ module.exports = function make_grammar(dialect) {
token(
seq(
choice(/\p{ID_Start}/, "_"),
repeat(choice(/\p{ID_Continue}/, "-")),
repeat(choice(/\p{ID_Continue}/, "-", "::")),
),
),

View File

@@ -143,6 +143,10 @@
{
"type": "STRING",
"value": "-"
},
{
"type": "STRING",
"value": "::"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -96,3 +96,26 @@ foo = bar(
(quoted_template_start)
(template_literal)
(quoted_template_end))))))))))
================================================================================
namespaced function call
================================================================================
foo = provider::time::rfc3339_parse("2023-07-25T23:43:16Z")
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(function_call
(identifier)
(function_arguments
(expression
(literal_value
(string_lit
(quoted_template_start)
(template_literal)
(quoted_template_end))))))))))