Commit graph

25 commits

Author SHA1 Message Date
earncef
6ec360c8b7 Fixed panic when bailout is triggered in parser.ParseFile() (#113)
* Fixed panic when bailout is triggered in parser.ParseFile()

* Removed redundant "parse error" prefix for parse errors.
2019-02-25 10:22:45 -08:00
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
9c67444678
Fixes a REPL bug (Issue #91) (#92) 2019-02-10 00:32:37 -08:00
Daniel Kang
eda0495f30 Fix several module-related issues 2019-02-02 22:22:40 -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
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
309b03bb30 add more strings functions to text module 2019-01-28 19:30:32 -08:00
Daniel Kang
85da0cdc24 force using TrueValue, FalseValue, UndefinedValue 2019-01-28 13:09:40 -08:00
Daniel Kang
88ba20da4e add Script.DisableBuiltinFunction, Script.DisableStdModule, Script.SetUserModuleLoader functions 2019-01-24 13:08:53 -08:00
Mike Bazuin
d8c83b6578 Moved interfaceToObject from scripts/conversion.go to objects/conversion.go as FromInterface 2019-01-22 21:09:52 +01:00
Daniel Kang
04bb0f5e62 add context to script run 2019-01-20 04:59:43 -08:00
Daniel Kang
a8d838ad3e Compile can take custom stdlibs 2019-01-18 09:19:45 -08:00
Daniel Kang
bff59006d1 add Variable.Error() function 2019-01-18 02:33:23 -08:00
Daniel Kang
8cad04841e add os File functions; add Bytes type 2019-01-18 01:43:46 -08:00
Daniel Kang
40ad7aa1bb Fix undefined value compatibility 2019-01-15 17:21:58 -08:00
Daniel Kang
d1f7baf054 add Variable.IsUndefined() 2019-01-15 17:17:08 -08:00
Daniel Kang
7f9fa836ee add missing comment 2019-01-15 10:15:48 -08:00
Daniel Kang
e1e0e0cb24 fix golint, ineffectassign issues and add some more tests 2019-01-15 10:14:16 -08:00
Daniel Kang
8e56bd8218 add Script.Run() method 2019-01-12 18:25:45 -08:00
Daniel Kang
94b0d52436 add tests for script custom objects 2019-01-11 03:15:31 -08:00
Daniel Kang
27438eea6f update directory package structure 2019-01-11 02:27:28 -08:00
Daniel Kang
53af0d6328 move file and fileset to source package 2019-01-11 01:16:34 -08:00
Daniel Kang
d870ebf72e variable definition (operator ":=") is now required not optional 2019-01-10 22:34:28 -08:00
Daniel Kang
cce71f0cd5 update script package 2019-01-09 12:39:40 -08:00