-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into merge-repos-try2
- Loading branch information
Showing
40 changed files
with
3,149 additions
and
3,177 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
["_h", 32, "-- test functions --", 2, "print", 1, 35, 41, "add", 2, 6, 36, 0, 36, 1, 6, 38, 41, "add2", 2, 9, 36, 0, 36, | ||
1, 6, 36, 2, 38, 35, 41, "mult", 2, 6, 36, 0, 36, 1, 8, 38, 41, "noArgs", 0, 12, 32, "basdfasdf", 33, 3, 33, 2, 6, 36, | ||
1, 38, 35, 35, 41, "empty", 0, 2, 31, 38, 41, "empty2", 0, 4, 29, 35, 31, 38, 41, "empty3", 0, 8, 29, 35, 29, 35, 29, | ||
35, 31, 38, 41, "noReturn", 0, 14, 33, 1, 33, 2, 36, 1, 36, 0, 6, 31, 38, 35, 35, 35, 33, 4, 33, 3, 2, "add", 2, 2, | ||
"print", 1, 35, 33, 1, 33, 1, 2, "add", 2, 33, 100, 33, 4, 33, 3, 2, "add", 2, 6, 6, 2, "print", 1, 35, 33, -1, 2, | ||
"noArgs", 0, 2, "ifNull", 2, 2, "print", 1, 35, 33, -1, 2, "empty", 0, 2, "ifNull", 2, 2, "print", 1, 35, 33, -1, 2, | ||
"empty2", 0, 2, "ifNull", 2, 2, "print", 1, 35, 33, -1, 2, "empty3", 0, 2, "ifNull", 2, 2, "print", 1, 35, 33, -1, 2, | ||
"noReturn", 0, 2, "ifNull", 2, 2, "print", 1, 35, 33, 2, 33, 1, 33, 2, 2, "add", 2, 33, 100, 33, 4, 33, 3, 2, "add", 2, | ||
6, 6, 2, "mult", 2, 2, "print", 1, 35, 33, 10, 33, 1, 33, 2, 2, "add2", 2, 33, 100, 33, 4, 33, 3, 2, "add2", 2, 6, 6, 2, | ||
"mult", 2, 2, "print", 1, 35] | ||
1, 38, 35, 35, 41, "empty", 0, 2, 31, 38, 41, "empty2", 0, 2, 31, 38, 41, "empty3", 0, 2, 31, 38, 41, "noReturn", 0, 14, | ||
33, 1, 33, 2, 36, 1, 36, 0, 6, 31, 38, 35, 35, 35, 33, 4, 33, 3, 2, "add", 2, 2, "print", 1, 35, 33, 1, 33, 1, 2, "add", | ||
2, 33, 100, 33, 4, 33, 3, 2, "add", 2, 6, 6, 2, "print", 1, 35, 33, -1, 2, "noArgs", 0, 2, "ifNull", 2, 2, "print", 1, | ||
35, 33, -1, 2, "empty", 0, 2, "ifNull", 2, 2, "print", 1, 35, 33, -1, 2, "empty2", 0, 2, "ifNull", 2, 2, "print", 1, 35, | ||
33, -1, 2, "empty3", 0, 2, "ifNull", 2, 2, "print", 1, 35, 33, -1, 2, "noReturn", 0, 2, "ifNull", 2, 2, "print", 1, 35, | ||
33, 2, 33, 1, 33, 2, 2, "add", 2, 33, 100, 33, 4, 33, 3, 2, "add", 2, 6, 6, 2, "mult", 2, 2, "print", 1, 35, 33, 10, 33, | ||
1, 33, 2, 2, "add2", 2, 33, 100, 33, 4, 33, 3, 2, "add2", 2, 6, 6, 2, "mult", 2, 2, "print", 1, 35] |
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,12 +1,12 @@ | ||
print([]); | ||
print([1, 2, 3]); | ||
print([1, '2', 3]); | ||
print([1, [2, 3], 4]); | ||
print([1, [2, [3, 4]], 5]); | ||
print([]) | ||
print([1, 2, 3]) | ||
print([1, '2', 3]) | ||
print([1, [2, 3], 4]) | ||
print([1, [2, [3, 4]], 5]) | ||
|
||
let a := [1, 2, 3]; | ||
print(a[1]); | ||
print([1, 2, 3][1]); | ||
print([1, [2, [3, 4]], 5][1][1][1]); | ||
print([1, [2, [3, 4]], 5][1][1][1] + 1); | ||
print([1, [2, [3, 4]], 5].1.1.1); | ||
let a := [1, 2, 3] | ||
print(a[1]) | ||
print([1, 2, 3][1]) | ||
print([1, [2, [3, 4]], 5][1][1][1]) | ||
print([1, [2, [3, 4]], 5][1][1][1] + 1) | ||
print([1, [2, [3, 4]], 5].1.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,13 +1,13 @@ | ||
print({}); | ||
print({'key': 'value'}); | ||
print({'key': 'value', 'other': 'thing'}); | ||
print({'key': {'otherKey': 'value'}}); | ||
print({key: 'value'}); | ||
print({}) | ||
print({'key': 'value'}) | ||
print({'key': 'value', 'other': 'thing'}) | ||
print({'key': {'otherKey': 'value'}}) | ||
print({key: 'value'}) | ||
|
||
let key := 3; | ||
print({key: 'value'}); | ||
let key := 3 | ||
print({key: 'value'}) | ||
|
||
print({'key': 'value'}.key); | ||
print({'key': 'value'}['key']); | ||
print({'key': {'otherKey': 'value'}}.key.otherKey); | ||
print({'key': {'otherKey': 'value'}}['key'].otherKey); | ||
print({'key': 'value'}.key) | ||
print({'key': 'value'}['key']) | ||
print({'key': {'otherKey': 'value'}}.key.otherKey) | ||
print({'key': {'otherKey': 'value'}}['key'].otherKey) |
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,35 +1,35 @@ | ||
print('-- test functions --'); | ||
print('-- test functions --') | ||
|
||
fn add(a, b) { | ||
return a + b; | ||
return a + b | ||
} | ||
fn add2(a, b) { | ||
let c := a + b; | ||
return c; | ||
let c := a + b | ||
return c | ||
} | ||
fn mult(a, b) { | ||
return a * b; | ||
return a * b | ||
} | ||
fn noArgs() { | ||
let url := 'basdfasdf'; | ||
let second := 2 + 3; | ||
return second; | ||
let url := 'basdfasdf' | ||
let second := 2 + 3 | ||
return second | ||
} | ||
fn empty() {} | ||
fn empty2() {;} | ||
fn empty3() {;;;} | ||
fn empty2() {} | ||
fn empty3() {} | ||
fn noReturn() { | ||
let a := 1; | ||
let b := 2; | ||
let c := a + b; | ||
let a := 1 | ||
let b := 2 | ||
let c := a + b | ||
} | ||
|
||
print(add(3, 4)); | ||
print(add(3, 4) + 100 + add(1, 1)); | ||
print(noArgs() ?? -1); | ||
print(empty() ?? -1); | ||
print(empty2() ?? -1); | ||
print(empty3() ?? -1); | ||
print(noReturn() ?? -1); | ||
print(mult(add(3, 4) + 100 + add(2, 1), 2)); | ||
print(mult(add2(3, 4) + 100 + add2(2, 1), 10)); | ||
print(add(3, 4)) | ||
print(add(3, 4) + 100 + add(1, 1)) | ||
print(noArgs() ?? -1) | ||
print(empty() ?? -1) | ||
print(empty2() ?? -1) | ||
print(empty3() ?? -1) | ||
print(noReturn() ?? -1) | ||
print(mult(add(3, 4) + 100 + add(2, 1), 2)) | ||
print(mult(add2(3, 4) + 100 + add2(2, 1), 10)) |
Oops, something went wrong.