forked from IndianBoy42/tree-sitter-just
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
258 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
================================================================================ | ||
basic strings | ||
================================================================================ | ||
|
||
foo := "a" | ||
bar := "b | ||
c | ||
" | ||
baz := "a\"\t" | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string | ||
(escape_sequence) | ||
(escape_sequence)))))) | ||
|
||
================================================================================ | ||
escape newlines | ||
================================================================================ | ||
|
||
foo := "a\ | ||
b" | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string | ||
(escape_sequence)))))) | ||
|
||
================================================================================ | ||
indented basic strings | ||
================================================================================ | ||
|
||
foo := """a""" | ||
bar:= """b | ||
c | ||
""" | ||
baz := """ | ||
abc \t | ||
def \" | ||
""" | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string | ||
(escape_sequence) | ||
(escape_sequence)))))) | ||
|
||
================================================================================ | ||
indented with nested delim | ||
================================================================================ | ||
|
||
foo := """ a " b """ | ||
bar:= """b | ||
"baz" | ||
""" | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(ERROR | ||
(identifier) | ||
(text) | ||
(text) | ||
(text) | ||
(text))) | ||
|
||
================================================================================ | ||
raw strings | ||
================================================================================ | ||
|
||
foo := 'a' | ||
bar := 'b | ||
c | ||
' | ||
baz := 'a\"\t' | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string))))) | ||
|
||
================================================================================ | ||
indented raw strings | ||
================================================================================ | ||
|
||
foo := '''a''' | ||
bar:= '''b | ||
c | ||
''' | ||
baz := '''' | ||
abc \t | ||
def \" | ||
''' | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string))))) | ||
|
||
================================================================================ | ||
indented raw with nested delim | ||
================================================================================ | ||
|
||
foo := ''' a ' ''' | ||
bar:= '''b | ||
'baz' | ||
''' | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string)))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(string))))) | ||
|
||
================================================================================ | ||
backticks | ||
================================================================================ | ||
|
||
foo := `echo hi` | ||
bar := `echo hi | ||
echo bye | ||
` | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(external_command | ||
(command_body))))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(external_command | ||
(command_body)))))) | ||
|
||
================================================================================ | ||
indented backticks | ||
================================================================================ | ||
|
||
foo := ```echo hi``` | ||
bar := ``` | ||
echo bye | ||
``` | ||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(external_command | ||
(command_body))))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(external_command | ||
(command_body)))))) | ||
|
||
================================================================================ | ||
indented backticks with nested delim | ||
================================================================================ | ||
|
||
foo := ``` a ` ``` | ||
bar:= ```b | ||
`baz` | ||
``` | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(external_command | ||
(command_body))))) | ||
(assignment | ||
(identifier) | ||
(expression | ||
(value | ||
(external_command | ||
(command_body)))))) |
Oops, something went wrong.