mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-08-16 01:08:13 +02:00
fix: parse multi-word unquoted string values
This commit is contained in:
parent
38ed78c2ed
commit
b0e11dc786
5 changed files with 509 additions and 404 deletions
|
|
@ -62,9 +62,12 @@ module.exports = grammar({
|
|||
|
||||
string: $ => choice(
|
||||
$._string,
|
||||
$._literal_string
|
||||
$._literal_string,
|
||||
$._unquoted_string,
|
||||
),
|
||||
|
||||
_unquoted_string: $ => alias(/[^\#\s\"\'\$]+(?:[ \t]+[^\#\s\"\'\$]+)+/, $.string_content),
|
||||
|
||||
_literal_string: $ => seq(
|
||||
"'",
|
||||
optional(alias(/[^']+/, $.string_content)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue