forked from google/codeworld
-
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.
Disable pattern guards in codeworld-mode.
Add an error sanitizer case to fix up the resulting errors. Fix out-of-date unit tests, so they are all passing again. Also, while I was here, prettify the script output using colors. Fixes google#537
- Loading branch information
Showing
24 changed files
with
58 additions
and
35 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
2 changes: 1 addition & 1 deletion
2
codeworld-compiler/test/testcase/test_animation/saved_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
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 @@ | ||
main = animationOf(propellor) | ||
program = animationOf(propellor) | ||
propellor = rotated(solidRectangle(10, 1), 60) |
2 changes: 1 addition & 1 deletion
2
codeworld-compiler/test/testcase/test_arguments/saved_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
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 @@ | ||
main = drawingOf(rectangle(2,2,2,2)) | ||
program = drawingOf(rectangle(2,2,2,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,3 +1,3 @@ | ||
main = drawingOf(redWheel) | ||
program = drawingOf(redWheel) | ||
redWheel = colored(wheel, reds) | ||
wheel = solidCircle(4) |
6 changes: 3 additions & 3 deletions
6
codeworld-compiler/test/testcase/test_combiningAnimation/saved_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
6 changes: 3 additions & 3 deletions
6
codeworld-compiler/test/testcase/test_combiningAnimation/source.hs
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 @@ | ||
main = animationOf(a & b) | ||
a(t) = rotated(solidRectangle(1, 1), 45 * t) | ||
b(t) = circle(t) | ||
program = animationOf(a & b) | ||
a(t) = rotated(solidRectangle(1, 1), 45 * t) | ||
b(t) = circle(t) |
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 @@ | ||
main = drawingOf(thing(1) & thing(2)) | ||
program = drawingOf(thing(1) & thing(2)) | ||
thing(n) = if n > 1 rectangle(n, n) else circle(n) |
2 changes: 1 addition & 1 deletion
2
codeworld-compiler/test/testcase/test_listComprehension/source.hs
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 @@ | ||
main = drawingOf(target) | ||
program = drawingOf(target) | ||
target = pictures([ circle(r) | r = [1, 2, 3, 4, 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 +1 @@ | ||
main = drawingOf(circle(2) | ||
program = drawingOf(circle(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,4 +1,4 @@ | ||
|
||
program.hs:1:18: error: | ||
program.hs:1:21: error: | ||
• Variable not in scope: diamond :: Picture | ||
• Perhaps you meant diamonds (line 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,2 +1,2 @@ | ||
main = drawingOf(diamond) | ||
program = drawingOf(diamond) | ||
diamonds = rotated(rectangle(2, 2), 45) |
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
5 changes: 3 additions & 2 deletions
5
codeworld-compiler/test/testcase/test_pointType/saved_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,9 +1,10 @@ | ||
program.hs:1:18: error: Missing parentheses in function application | ||
|
||
|
||
program.hs:7:7: error: | ||
• Couldn't match type [Number] with (Number, Number) | ||
Expected type: Point | ||
Actual type: [Number] | ||
• In the expression: [2, - 4] | ||
In an equation for end: end = [2, - 4] | ||
|
||
|
||
program.hs:1:21: warning: Missing parentheses in function application. |
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 @@ | ||
main = drawingOf(path[start, end]) | ||
program = drawingOf(path[start, end]) | ||
|
||
start :: Point | ||
start = (0, 0) | ||
|
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,3 +1,3 @@ | ||
main = simulationOf(step, picture) | ||
program = simulationOf(step, picture) | ||
step((x, y), dt) = (x - y * dt, y + x * dt) | ||
picture(x, y) = translated(rectangle(1, 1), x, y) |
2 changes: 1 addition & 1 deletion
2
codeworld-compiler/test/testcase/test_variableName/saved_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,5 +1,5 @@ | ||
|
||
program.hs:1:18: error: | ||
program.hs:1:21: error: | ||
• Variable not in scope: circl :: Picture | ||
• Perhaps you meant one of these: | ||
circ (line 2), circle (defined in the standard library) |
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 @@ | ||
main = drawingOf(circl) | ||
program = drawingOf(circl) | ||
circ = circle(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
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