-
Notifications
You must be signed in to change notification settings - Fork 125
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
85 changed files
with
595 additions
and
730 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
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
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
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
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
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
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
4 changes: 2 additions & 2 deletions
4
tests/script_errors/heredoc_interpolation_extractor/error.txt
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: | ||
1 | let heredoc = """ | ||
2 | { | } | ||
| ^^^ It looks like you forgot to terminate an extractor with a closing '|' | ||
2 | #{ | } | ||
| ^^^ It looks like you forgot to terminate an extractor with a closing '|' |
2 changes: 1 addition & 1 deletion
2
tests/script_errors/heredoc_interpolation_extractor/script.tremor
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
let heredoc = """ | ||
{ | } | ||
#{ | } | ||
"""; |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: | ||
1 | """ | ||
2 | before { `ident unfinished } after | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like you forgot to terminate an ident with a closing '`' | ||
2 | before #{ `ident unfinished } after | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like you forgot to terminate an ident with a closing '`' |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
""" | ||
before { `ident unfinished } after | ||
before #{ `ident unfinished } after | ||
""" |
4 changes: 2 additions & 2 deletions
4
tests/script_errors/heredoc_interpolation_multiline/error.txt
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: | ||
1 | """ | ||
2 | { " | ||
| ^ It looks like you forgot to terminate a string with a closing '"' | ||
2 | #{ " | ||
| ^ It looks like you forgot to terminate a string with a closing '"' |
2 changes: 1 addition & 1 deletion
2
tests/script_errors/heredoc_interpolation_multiline/script.tremor
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
""" | ||
{ " | ||
#{ " | ||
|
||
} | ||
""" |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Error: | ||
1 | """ | ||
2 | { | ||
| ^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '{' ? Escape it as '\{' or '{{'. | ||
2 | #{ | ||
| ^^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '#{' ? Escape it as '\#{'. |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
""" | ||
{ | ||
#{ |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Error: | ||
1 | """ | ||
2 | {""" | ||
| ^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '{' ? Escape it as '\{' or '{{'. | ||
2 | #{""" | ||
| ^^^^^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '#{' ? Escape it as '\#{'. |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
""" | ||
{""" | ||
#{""" |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Error: | ||
2 | let x = """ | ||
3 | {"""; | ||
| ^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '{' ? Escape it as '\{' or '{{'. | ||
3 | #{"""; | ||
| ^^^^^^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '#{' ? Escape it as '\#{'. |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
use std::string; | ||
let x = """ | ||
{"""; | ||
#{"""; |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: | ||
1 | "{" | ||
| ^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '{' ? Escape it as '\{' or '{{'. | ||
1 | "#{" | ||
| ^^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '#{' ? Escape it as '\#{'. |
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 |
---|---|---|
@@ -1 +1 @@ | ||
"{" | ||
"#{" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: | ||
1 | let x = "before { { {}"; | ||
| ^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '{' ? Escape it as '\{' or '{{'. | ||
1 | let x = "before #{ { {}"; | ||
| ^^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '#{' ? Escape it as '\#{'. |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
let x = "before { { {}"; | ||
let x = "before #{ { {}"; | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: | ||
1 | use std::string; | ||
2 | let e = "\u0065 { `unterminated_ident } \u0076 {2} \u0080"; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like you forgot to terminate an ident with a closing '`' | ||
2 | let e = "\u0065 #{ `unterminated_ident } \u0076 #{2} \u0080"; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like you forgot to terminate an ident with a closing '`' |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
use std::string; | ||
let e = "\u0065 { `unterminated_ident } \u0076 {2} \u0080"; | ||
let e = "\u0065 #{ `unterminated_ident } \u0076 #{2} \u0080"; |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: | ||
1 | let si = "before { | ||
| ^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '{' ? Escape it as '\{' or '{{'. | ||
1 | let si = "before #{ | ||
| ^^ It looks like you forgot to terminate a string interpolation with a closing '}' | ||
| NOTE: Did you mean to write a literal '#{' ? Escape it as '\#{'. |
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 |
---|---|---|
@@ -1 +1 @@ | ||
let si = "before { | ||
let si = "before #{ |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Error: | ||
1 | let escape = " { "\z" } "; | ||
| ^^ An unexpected escape code 'z' was found | ||
1 | let escape = " #{ "\z" } "; | ||
| ^^ An unexpected escape code 'z' was found |
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 |
---|---|---|
@@ -1 +1 @@ | ||
let escape = " { "\z" } "; | ||
let escape = " #{ "\z" } "; |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Error: | ||
1 | " { | } " | ||
| ^^^^^ It looks like you forgot to terminate an extractor with a closing '|' | ||
1 | " #{ | } " | ||
| ^^^^^ It looks like you forgot to terminate an extractor with a closing '|' |
2 changes: 1 addition & 1 deletion
2
tests/script_errors/string_interpolation_extractor/script.tremor
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 |
---|---|---|
@@ -1 +1 @@ | ||
" { | } " | ||
" #{ | } " |
4 changes: 2 additions & 2 deletions
4
tests/script_errors/string_interpolation_invalid_utf8/error.txt
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Error: | ||
1 | " { " \u666G " } " | ||
| ^^^^^^ An invalid UTF8 escape sequence was found | ||
1 | " #{ " \u666G " } " | ||
| ^^^^^^ An invalid UTF8 escape sequence was found |
2 changes: 1 addition & 1 deletion
2
tests/script_errors/string_interpolation_invalid_utf8/script.tremor
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 |
---|---|---|
@@ -1 +1 @@ | ||
" { " \u666G " } " | ||
" #{ " \u666G " } " |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const a = "snot"; | ||
const b = ( a + " badger" ); | ||
|
||
"{b}: {event}!" | ||
"#{b}: #{event}!" |
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
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
mod b with | ||
fn snot(n) with | ||
"cake {n}" | ||
"cake #{n}" | ||
end; | ||
end; | ||
|
||
mod a with | ||
mod b with | ||
fn snot(n) with "snot {n}" end | ||
fn snot(n) with "snot #{n}" end | ||
end; | ||
fn badger(n) with "{b::snot(n)} badger {n}" end | ||
fn badger(n) with "#{b::snot(n)} badger #{n}" end | ||
end; | ||
|
||
[a::badger(event), b::snot(event)] |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
mod a with | ||
mod b with | ||
fn snot(n) with "snot {n}" end | ||
fn snot(n) with "snot #{n}" end | ||
end; | ||
fn badger(n) with "{b::snot(n)} badger {n}" end | ||
fn badger(n) with "#{b::snot(n)} badger #{n}" end | ||
end; | ||
|
||
a::badger(event) |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
""" | ||
{event.class} {event.answer} | ||
#{event.class} #{event.answer} | ||
""" |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
""" | ||
"{event}" => {"tremolo"} | ||
"#{event}" => #{"tremolo"} | ||
""" |
Binary file not shown.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
""" | ||
\{event\} = {{event}} = {event} | ||
\#{event} = \#{event} = #{event} | ||
""" |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# gives bad output: "Hello, snot! Your name is:\n! Your name is:\n snot\n" | ||
""" | ||
Hello, {event}! Your name is: | ||
{event} | ||
Hello, #{event}! Your name is: | ||
#{event} | ||
""" |
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use foo as foo; | ||
|
||
match event of | ||
case {} => "snot {foo::snot}" | ||
case {} => "snot #{foo::snot}" | ||
default => "ko" | ||
end; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use foo :: bar as bar; | ||
|
||
match event of | ||
case {} => "snot {bar::snot}" | ||
case {} => "snot #{bar::snot}" | ||
default => "ko" | ||
end; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use foo::bar::baz as baz; | ||
|
||
match event of | ||
case {} => "snot {baz::snot}" | ||
case {} => "snot #{baz::snot}" | ||
default => "ko" | ||
end; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use foo:: bar ::baz :: mork as bork ; | ||
|
||
match event of | ||
case {} => "snot {bork::snot}" | ||
case {} => "snot #{bork::snot}" | ||
default => "ko" | ||
end; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use foo; | ||
|
||
match event of | ||
case {} => "snot {foo::bar::snot}" | ||
case {} => "snot #{foo::bar::snot}" | ||
default => "ko" | ||
end; |
Oops, something went wrong.