Commit graph

306 commits

Author SHA1 Message Date
Daniel
3500c686b3
Improvements on compiler/VM error reporting (filename:line:col)
- add type infos to VM error messages
- add 'Name' to UserFunction objects 
- add 'expectErrorString' to VM tests
- replace vm.expectError() with vm.expectErrorString() to make it more explicit
- add source map info to VM error messages
- optimization in function calls
- add file/line/col info to compiler errors
- change stdlib module to be loaded from VM (instead of compiler) so they can be properly loaded after the source is compiled into binary
- VM can take builtin modules optionally
2019-02-20 16:26:11 -08:00
Daniel
cb1c8a405e
Fix a bug for 'for' loop without condition: "for {}" (#100) 2019-02-12 01:28:23 -08:00
Daniel
fc4e3586c4
Fix a closure-block scope bug (#99)
* fix issue #98

* remove objects.CompiledModule

* remove objects.CompiledModule
2019-02-11 17:34:02 -08:00
Daniel
9ccc6dd901
add Bytecode.FormatInstructions and Bytecode.FormatConstants (#95) 2019-02-10 21:44:22 -08:00
Daniel
9c67444678
Fixes a REPL bug (Issue #91) (#92) 2019-02-10 00:32:37 -08:00
earncef
5e21abfd74 IndexGet of Array, Index, ImmutableIndex, Bytes, String, Undefined 2019-02-09 16:45:21 -08:00
Daniel
2b517f376e
add 'rand' module (#90) 2019-02-09 12:33:35 -08:00
Daniel
9782d87c35
Merge pull request #86 from d5/ostestfix
minor cleanups for 'os' module tests
2019-02-07 15:22:16 -08:00
Daniel Kang
a9f9ba4592 minor cleanups for 'os' module tests 2019-02-07 15:18:49 -08:00
Daniel
e81380bb38
Merge pull request #85 from ripienaar/84
add os.read_file()
2019-02-07 15:13:11 -08:00
R.I.Pienaar
06c7e7df61 add os.readfile() 2019-02-07 21:58:47 +01:00
Daniel
a9224a3593
Merge pull request #81 from ripienaar/80
add file.stat()
2019-02-06 10:25:52 -08:00
R.I.Pienaar
69961de7de add os.stat() and file.stat() 2019-02-06 15:20:41 +01:00
Daniel
edfb765258
Merge pull request #76 from d5/is_function
'is_function' and 'is_callable' builtin functions
2019-02-03 15:55:18 -08:00
Daniel Kang
90aafc8bb4 Add 'is_function' and 'is_callable' builtin functions 2019-02-03 15:50:40 -08:00
Daniel
d90f2865ef
Merge pull request #74 from d5/iarrlen
Some bug fixes
2019-02-02 23:21:07 -08:00
Daniel Kang
5713eb64fe Fix a slicing expression bug: allow low-index == len(a) 2019-02-02 23:11:02 -08:00
Daniel Kang
eda0495f30 Fix several module-related issues 2019-02-02 22:22:40 -08:00
Daniel Kang
9c21c8a804 Fix a bug where user modules couldn't resolve builtin functions 2019-02-01 18:13:29 -08:00
Daniel Kang
c57a7f8f98 Fix a bug where len() builtin does not take immutable array 2019-02-01 17:32:05 -08:00
Daniel
4f222b1650
Merge pull request #73 from d5/charop
Operators on Char type
2019-02-01 17:03:11 -08:00
Daniel Kang
9e73f40485 1. Added documentation on operators. 2. Add (char)-(int) operators 2019-02-01 16:58:44 -08:00
Daniel
0d99cca738
Merge pull request #72 from d5/compiledset
replacing values of the compiled script
2019-02-01 11:32:07 -08:00
Daniel Kang
4f4646032c Update documentation for compiled scripts 2019-02-01 11:25:57 -08:00
Daniel Kang
6a663c6360 add script.Compiled.Set function so compiled script can replace value of global variables 2019-02-01 11:09:12 -08:00
Daniel Kang
6420628310
Merge pull request #70 from d5/fix69
Remove unused tokens
2019-01-31 12:43:12 -08:00
Daniel Kang
061d800cf8 removed 'case', 'default', 'switch', 'var' keywords 2019-01-31 12:40:14 -08:00
Daniel Kang
61e534eb67
Merge pull request #64 from d5/scriptmodule
Script Imports
2019-01-31 08:59:14 -08:00
Daniel Kang
44248b8c4b
Update interoperability.md 2019-01-31 01:14:47 -08:00
Daniel Kang
85d90f61ab
Update objects.md 2019-01-31 00:41:35 -08:00
Daniel Kang
950cb79648 update documentation 2019-01-31 00:39:45 -08:00
Daniel Kang
46c7190109 Script.AddModule() to take *Script not *Compiled 2019-01-30 23:06:00 -08:00
Daniel Kang
edc23cf2f1 working on script modules (WIP) 2019-01-30 21:50:15 -08:00
Daniel Kang
f7b0cd8299
Merge pull request #62 from d5/v1prep
v1 release prep
2019-01-30 02:05:26 -08:00
Daniel Kang
64d99807d8 remove unused code for tuple value return 2019-01-30 02:01:44 -08:00
Daniel Kang
c628152b9f
update benchmark 2019-01-30 01:48:39 -08:00
Daniel Kang
806ddeba3d fix CLI version command 2019-01-30 01:31:41 -08:00
Daniel Kang
b19d9de0bf update CLI documentation 2019-01-30 01:23:26 -08:00
Daniel Kang
0e9c5231a5 1. fix bytecode compile bug 2. update CLI 2019-01-30 01:21:26 -08:00
Daniel Kang
a9aa8dc673 update documentation 2019-01-30 01:05:35 -08:00
Daniel Kang
760bc44547 add goreleaser deploy to travis 2019-01-30 00:52:55 -08:00
Daniel Kang
fdc52a0f83
Merge pull request #58 from d5/stringstime
'text' and 'times' modules
2019-01-29 23:50:21 -08:00
Daniel Kang
06573e5904 add documentation for times module 2019-01-29 21:22:58 -08:00
Daniel Kang
49b2b5f75f add documentation for text module 2019-01-29 21:08:21 -08:00
Daniel Kang
591d745ef7 updating documents for stdlib 2019-01-29 20:46:30 -08:00
Daniel Kang
306fe1b24c clean up stdlib code 2019-01-29 19:52:00 -08:00
Daniel Kang
a9a93801b7 add 'times' module 2019-01-29 17:39:25 -08:00
Daniel Kang
378bf510d3 add Time type; add is_array, is_immutable_array, is_map, is_immutable_map, is_time, time builtin function 2019-01-29 16:01:14 -08:00
Daniel Kang
f752601ff2 add strconv functions 2019-01-29 15:05:03 -08:00
Daniel Kang
309b03bb30 add more strings functions to text module 2019-01-28 19:30:32 -08:00