-
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.
Enhancements: - Add initial support for string interpolation (see #1071) Bugs fixed: - Can't use ref struct types (partial fix only #1077)
- Loading branch information
Showing
117 changed files
with
822 additions
and
64 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 |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
] | ||
}, | ||
"ghul.compiler": { | ||
"version": "0.7.9", | ||
"version": "0.7.10", | ||
"commands": [ | ||
"ghul-compiler" | ||
] | ||
|
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
23 changes: 23 additions & 0 deletions
23
integration-tests/execution/string-interpolation-1/.vscode/tasks.json
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,23 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run test", | ||
"command": "dotnet ghul-test \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Capture test expectation", | ||
"command": "../../../tasks/capture.sh \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
Empty file.
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,6 @@ | ||
{ | ||
"compiler": "dotnet ../../../publish/ghul.dll", | ||
"source": [ | ||
"." | ||
] | ||
} |
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions
4
integration-tests/execution/string-interpolation-1/run.expected
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,4 @@ | ||
interpolate 30 and -10 together | ||
20 at the beginning and 0 in the middle | ||
now 40 in the middle and end with 40 | ||
13-5 |
15 changes: 15 additions & 0 deletions
15
integration-tests/execution/string-interpolation-1/test.ghul
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,15 @@ | ||
use IO.Std.write_line; | ||
|
||
entry() is | ||
let x = 10; | ||
let y = 20; | ||
|
||
write_line({interpolate {x+y} and {x-y} together}); | ||
|
||
write_line({{x+x} at the beginning and {y-y} in the middle}); | ||
|
||
write_line({now {x+y+x} in the middle and end with {x + x + y}}); | ||
|
||
write_line({{x + 3}{x - y + 5}}); | ||
si | ||
|
Empty file.
23 changes: 23 additions & 0 deletions
23
integration-tests/execution/string-interpolation-2/.vscode/tasks.json
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,23 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run test", | ||
"command": "dotnet ghul-test \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Capture test expectation", | ||
"command": "../../../tasks/capture.sh \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
Empty file.
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,6 @@ | ||
{ | ||
"compiler": "dotnet ../../../publish/ghul.dll", | ||
"source": [ | ||
"." | ||
] | ||
} |
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions
4
integration-tests/execution/string-interpolation-2/run.expected
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,4 @@ | ||
interpolate 132 and -209 together | ||
220 at the beginning and 0 in the middle | ||
now 242 in the middle and end with 341 | ||
41-204 |
17 changes: 17 additions & 0 deletions
17
integration-tests/execution/string-interpolation-2/test.ghul
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,17 @@ | ||
use IO.Std.write_line; | ||
|
||
test(x: int) -> int => x * 10; | ||
|
||
entry() is | ||
let x = 11; | ||
let y = 22; | ||
|
||
write_line({interpolate {test(x)+y} and {x-test(y)} together}); | ||
|
||
write_line({{test(x)+test(x)} at the beginning and {test(y-y)} in the middle}); | ||
|
||
write_line({now {x+test(y)+x} in the middle and end with {test(x) + x + test(y)}}); | ||
|
||
write_line({{x + test(3)}{x - test(y) + 5}}); | ||
si | ||
|
Empty file.
23 changes: 23 additions & 0 deletions
23
integration-tests/execution/string-interpolation-3/.vscode/tasks.json
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,23 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run test", | ||
"command": "dotnet ghul-test \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Capture test expectation", | ||
"command": "../../../tasks/capture.sh \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
Empty file.
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,6 @@ | ||
{ | ||
"compiler": "dotnet ../../../publish/ghul.dll", | ||
"source": [ | ||
"." | ||
] | ||
} |
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
integration-tests/execution/string-interpolation-3/run.expected
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 @@ | ||
interpolate /interpolate x: 11/ and /interpolate y: 22/ together |
13 changes: 13 additions & 0 deletions
13
integration-tests/execution/string-interpolation-3/test.ghul
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,13 @@ | ||
use IO.Std.write_line; | ||
|
||
test(x: string) -> string => {/{x}/}; | ||
|
||
entry() is | ||
let x = 11; | ||
let y = 22; | ||
|
||
test("hello"); | ||
|
||
write_line({interpolate {test({interpolate x: {x}})} and {test({interpolate y: {y}})} together}); | ||
si | ||
|
Empty file.
23 changes: 23 additions & 0 deletions
23
integration-tests/execution/string-interpolation-4/.vscode/tasks.json
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,23 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run test", | ||
"command": "dotnet ghul-test \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Capture test expectation", | ||
"command": "../../../tasks/capture.sh \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
integration-tests/execution/string-interpolation-4/fail.expected
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 @@ | ||
|
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,6 @@ | ||
{ | ||
"compiler": "dotnet ../../../publish/ghul.dll", | ||
"source": [ | ||
"." | ||
] | ||
} |
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 @@ | ||
--type-check |
Empty file.
15 changes: 15 additions & 0 deletions
15
integration-tests/execution/string-interpolation-4/test.ghul
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,15 @@ | ||
use IO.Std.write_line; | ||
|
||
entry() is | ||
let x = 10; | ||
let y = 20; | ||
|
||
write_line({interpolate {x+y} and {x-y} together}); | ||
|
||
write_line({{x+x} at the beginning and {y-y} in the middle}); | ||
|
||
write_line({now {x+y+x} in the middle and end with {x + x + y}}); | ||
|
||
write_line({{x + 3}{x - y + 5}}); | ||
si | ||
|
Empty file.
2 changes: 1 addition & 1 deletion
2
integration-tests/parse/expression-function-with-explicit-type-arguments-3/err.expected
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 @@ | ||
test.ghul: 11,37..11,39: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found [] | ||
test.ghul: 11,37..11,39: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found [] | ||
test.ghul: 11,37..11,39: error: syntax error: expected ; but found [] |
2 changes: 1 addition & 1 deletion
2
integration-tests/parse/expression-function-with-explicit-type-arguments-6/err.expected
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 @@ | ||
test.ghul: 15,37..15,39: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found [] | ||
test.ghul: 15,37..15,39: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found [] | ||
test.ghul: 15,37..15,39: error: syntax error: expected ; but 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,3 +1,3 @@ | ||
test.ghul: 7,13..7,17: error: symbol not found: blah | ||
test.ghul: 8,9..8,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 8,9..8,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si | ||
test.ghul: 8,9..8,11: error: in secondary expression: expected ) but found si |
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 @@ | ||
test.ghul: 8,1..8,2: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 8,1..8,2: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si |
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 @@ | ||
test.ghul: 2,14..2,16: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found do | ||
test.ghul: 2,14..2,16: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found do |
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 @@ | ||
test.ghul: 4,1..4,3: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 4,1..4,3: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si |
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 @@ | ||
test.ghul: 4,1..4,3: error: in for statement: expected do but found si | ||
test.ghul: 4,1..4,3: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 3,1..3,3: error: in for statement: expected do but found si | ||
test.ghul: 3,1..3,3: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si |
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,3 @@ | ||
|
||
variable_in_and_half_a_range() is | ||
for i in 0.. | ||
si | ||
|
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 @@ | ||
test.ghul: 8,9..8,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 8,9..8,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si |
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 @@ | ||
test.ghul: 5,5..5,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 5,5..5,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si | ||
test.ghul: 5,5..5,7: error: syntax error: expected ; but found si |
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 @@ | ||
test.ghul: 6,5..6,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 6,5..6,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si | ||
test.ghul: 6,5..6,7: error: syntax error: expected ; but found si |
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 @@ | ||
test.ghul: 5,5..5,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 5,5..5,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si | ||
test.ghul: 5,5..5,7: error: syntax error: expected ; but found si |
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 @@ | ||
test.ghul: 6,5..6,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 6,5..6,7: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si | ||
test.ghul: 6,5..6,7: error: syntax error: expected ; but found si |
23 changes: 23 additions & 0 deletions
23
integration-tests/parse/incomplete-string-interpolation-1/.vscode/tasks.json
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,23 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run test", | ||
"command": "dotnet ghul-test \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Capture test expectation", | ||
"command": "../../../tasks/capture.sh \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
integration-tests/parse/incomplete-string-interpolation-1/err.expected
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 @@ | ||
test.ghul: 6,5..7,1: error: newline in interpolation |
1 change: 1 addition & 0 deletions
1
integration-tests/parse/incomplete-string-interpolation-1/fail.expected
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 @@ | ||
|
6 changes: 6 additions & 0 deletions
6
integration-tests/parse/incomplete-string-interpolation-1/ghul.json
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,6 @@ | ||
{ | ||
"compiler": "dotnet ../../../publish/ghul.dll", | ||
"source": [ | ||
"." | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
integration-tests/parse/incomplete-string-interpolation-1/ghulflags
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 @@ | ||
--type-check |
Empty file.
8 changes: 8 additions & 0 deletions
8
integration-tests/parse/incomplete-string-interpolation-1/test.ghul
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,8 @@ | ||
|
||
entry() is | ||
let x = 10; | ||
let y = 20; | ||
|
||
{interpolate | ||
si | ||
|
Empty file.
23 changes: 23 additions & 0 deletions
23
integration-tests/parse/incomplete-string-interpolation-2/.vscode/tasks.json
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,23 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run test", | ||
"command": "dotnet ghul-test \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Capture test expectation", | ||
"command": "../../../tasks/capture.sh \"${workspaceFolder}\"", | ||
"type": "shell", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
integration-tests/parse/incomplete-string-interpolation-2/err.expected
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,4 @@ | ||
test.ghul: 7,19..8,1: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found cancel string | ||
test.ghul: 7,19..8,1: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found cancel string | ||
test.ghul: 7,19..8,1: error: newline in interpolation | ||
test.ghul: 7,19..8,1: error: syntax error: expected ; but found cancel string |
1 change: 1 addition & 0 deletions
1
integration-tests/parse/incomplete-string-interpolation-2/fail.expected
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 @@ | ||
|
6 changes: 6 additions & 0 deletions
6
integration-tests/parse/incomplete-string-interpolation-2/ghul.json
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,6 @@ | ||
{ | ||
"compiler": "dotnet ../../../publish/ghul.dll", | ||
"source": [ | ||
"." | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
integration-tests/parse/incomplete-string-interpolation-2/ghulflags
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 @@ | ||
--type-check |
Empty file.
9 changes: 9 additions & 0 deletions
9
integration-tests/parse/incomplete-string-interpolation-2/test.ghul
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,9 @@ | ||
|
||
entry() is | ||
let x = 10; | ||
let y = 20; | ||
|
||
// FIXME we need better error recovery here | ||
{interpolate {} | ||
si | ||
|
Empty file.
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 @@ | ||
test.ghul: 7,9..7,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 7,9..7,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si |
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 @@ | ||
test.ghul: 7,9..7,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true or typeof but found si | ||
test.ghul: 7,9..7,11: error: in primary expression: expected (, [, cast, char literal, false, float literal, identifier, if, int literal, isa, new, null, self, string literal, super, true, typeof or { but found si |
Oops, something went wrong.