-
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
1 parent
842b043
commit 91bb6c8
Showing
13 changed files
with
37 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
shy fn div0(a, b) { | ||
div0 := fn(a, b) { | ||
if b == 0 { | ||
error("DIV BY ZERO !") | ||
} else { | ||
rt a / b | ||
} | ||
} | ||
|
||
shy fn div1(a, b) {rt div0(a, b)} | ||
shy fn div2(a, b) {rt div1(a, b)} | ||
div1 := fn(a, b) => div0(a, b) | ||
div2 := fn(a, b) => div1(a, b) | ||
|
||
shy ok, result = pcall(div2, 4, 2); print(ok, result) | ||
shy ok, err = pcall(div2, 5, 0); print(ok, err) | ||
shy ok, err = pcall(div2, {}, {}); print(ok, err) | ||
ok, result := pcall(div2, 4, 2); print(ok, result) | ||
ok, err := pcall(div2, 5, 0); print(ok, err) | ||
ok, err := pcall(div2, {}, {}); print(ok, err) |
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 |
---|---|---|
|
@@ -7,4 +7,3 @@ fn Girlfriend:herName(name) { | |
fn Girlfriend:hello() { | ||
print(fmt('My honey %s ~', self.name)) | ||
} | ||
|
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,4 +1,4 @@ | ||
shy a = 1 | ||
a := 1 | ||
class test2 { | ||
'b': 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 +1 @@ | ||
{"v":"0.1.4","si":"LANG_LK","h":"","p":{"s":"test/module.lk","ld":0,"lld":0,"np":0,"iv":1,"ms":5,"c":[1,16459,32897,49345,16826442,2155888648,4210758,65665,65729,16826442,107,4210822,82113,16683,25231498,8388645],"cs":[1,"test2","b",2,"const","add"],"us":[{"is":1,"idx":0}],"ps":[{"s":"test/module.lk","ld":8,"lld":10,"np":1,"iv":0,"ms":3,"c":[133,16777293,73,8388645],"cs":[],"us":[{"is":1,"idx":0}],"ps":[],"li":[9,9,9,10],"lvs":[{"vn":"n","spc":0,"epc":4}],"uns":["a"]},{"s":"test/module.lk","ld":12,"lld":15,"np":1,"iv":0,"ms":6,"c":[69,4194439,16793699,64,129,4194567,8388933,33636557,16826442,8388645],"cs":["b"],"us":[{"is":1,"idx":1},{"is":1,"idx":0}],"ps":[],"li":[13,13,13,14,14,14,14,14,14,15],"lvs":[{"vn":"self","spc":0,"epc":10}],"uns":["add","a"]}],"li":[1,2,3,3,3,2,6,6,6,6,10,12,12,15,12,15],"lvs":[{"vn":"a","spc":1,"epc":16},{"vn":"add","spc":11,"epc":16}],"uns":["_ENV"]}} | ||
{"v":"0.1.5","si":"LANG_LK","h":"","p":{"s":"test/module.lk","ld":0,"lld":0,"np":0,"iv":1,"ms":5,"c":[1,16459,32897,49345,16826442,2155888648,4210758,65665,65729,16826442,107,4210822,82113,16683,25231498,8388645],"cs":[1,"test2","b",2,"const","add"],"us":[{"is":1,"idx":0}],"ps":[{"s":"test/module.lk","ld":8,"lld":10,"np":1,"iv":0,"ms":3,"c":[133,16777293,73,8388645],"cs":[],"us":[{"is":1,"idx":0}],"ps":[],"li":[9,9,9,10],"lvs":[{"vn":"n","spc":0,"epc":4}],"uns":["a"]},{"s":"test/module.lk","ld":12,"lld":15,"np":1,"iv":0,"ms":6,"c":[69,4194439,16793699,64,129,4194567,8388933,33636557,16826442,8388645],"cs":["b"],"us":[{"is":1,"idx":1},{"is":1,"idx":0}],"ps":[],"li":[13,13,13,14,14,14,14,14,14,15],"lvs":[{"vn":"self","spc":0,"epc":10}],"uns":["add","a"]}],"li":[1,2,3,3,3,2,6,6,6,6,10,12,12,15,12,15],"lvs":[{"vn":"a","spc":1,"epc":16},{"vn":"add","spc":11,"epc":16}],"uns":["_ENV"]}} |
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 @@ | ||
shy pattern = `([A-Za-z0-9]+).*(\*).*(\[\])` | ||
shy text = 'foo9 * []' | ||
shy matches = re.find(pattern, text) | ||
pattern := `([A-Za-z0-9]+).*(\*).*(\[\])` | ||
text := 'foo9 * []' | ||
matches := re.find(pattern, text) | ||
for k, v in matches { | ||
print(k, v) | ||
} |
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