mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-16 01:54:56 +02:00
Problem was before that for example the input [0x000KKK] would produce a hexadecimal and a value token (for the respective parts) However, the more correct way is to have the whole input identified as a value token. basicly if the whole input between "=" and a special "end-of-assignment" token can't be identified as a string,bool,integer whatever. it should be identified as a value token.
40 lines
834 B
Text
40 lines
834 B
Text
================================================================================
|
|
Comments
|
|
================================================================================
|
|
|
|
# Comment
|
|
|
|
#
|
|
# Multi line comment.
|
|
#
|
|
|
|
EMPTY_WITH_COMMENT=# comment
|
|
EMPTY_WITH_COMMENT_WHITESPACE = # comment
|
|
|
|
STRING_VALUE_WITH_COMMENT = 'string content' # comment
|
|
STRING_VALUE_WITH_COMMENT = "string" # comment
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(comment)
|
|
(comment)
|
|
(comment)
|
|
(comment)
|
|
(assignment
|
|
key: (identifier))
|
|
(comment)
|
|
(assignment
|
|
key: (identifier))
|
|
(comment)
|
|
(assignment
|
|
key: (identifier)
|
|
value: (string
|
|
(string_content)))
|
|
(comment)
|
|
(assignment
|
|
key: (identifier)
|
|
value: (string_interpolation
|
|
(string_content)))
|
|
(comment))
|
|
|