mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-16 01:54:56 +02:00
adding variable support
This commit is contained in:
parent
8c66bd3605
commit
7223d87d9e
5 changed files with 582 additions and 290 deletions
44
test/corpus/variables.txt
Normal file
44
test/corpus/variables.txt
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
================================================================================
|
||||
Variables
|
||||
================================================================================
|
||||
|
||||
BASIC = $VARIABLE
|
||||
GROUP = ${VARIABLE}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(document
|
||||
(assignment
|
||||
key: (identifier)
|
||||
value: (variable
|
||||
(identifier)))
|
||||
(assignment
|
||||
key: (identifier)
|
||||
value: (variable
|
||||
(identifier))))
|
||||
|
||||
================================================================================
|
||||
Variables in strings
|
||||
================================================================================
|
||||
|
||||
UNDERSCORE = "$VARIABLE_WITH_UNDERSCORE"
|
||||
MULTIPLE = "variable is: ${VARIABLE}, and $ANOTHER !!!"
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(document
|
||||
(assignment
|
||||
key: (identifier)
|
||||
value: (string
|
||||
(variable
|
||||
(identifier))))
|
||||
(assignment
|
||||
key: (identifier)
|
||||
value: (string
|
||||
(string_content)
|
||||
(variable
|
||||
(identifier))
|
||||
(string_content)
|
||||
(variable
|
||||
(identifier))
|
||||
(string_content))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue