Commit graph

54 commits

Author SHA1 Message Date
daniel
d5b24138d3
add go module v2 (#244) 2019-12-29 13:38:51 -08:00
daniel
c88a5f506e
some code clean up (#237) 2019-12-20 11:40:38 -08:00
Kazushi Kitaya
ad3980e4d0 replace outdated ErrInvalidTypeConversion in docs/objects.md (#223) 2019-10-24 10:19:02 +02:00
Brandon Buck
c3e41c2588 Correct misattributed string() details (#222)
* Correct misattributed `string()` details
2019-10-24 10:18:38 +02:00
Ma_124
1ee7425c9d Stdlib encodings: hex, base64 (#216) (#221)
* stdlib/hex and stdlib/base64

* stdlib/hex and stdlib/base64: added docs
2019-08-09 13:36:45 -04:00
Jacob R. McCollum
adcf05d26f add variadic function parameters (#189)
* parsing variable function types

* finished variadic functions

* fix case where number of passed args to variadic function is 0

* remove extraneous OpVarArgs

* allow multiple variables in variadic function declaration

* fix IdentList string method to print multi-arg variadic functions correctly

* round 2 of fix IdentList string method to print multi-arg variadic functions correctly

round 2 of fix IdentList string method to print multi-arg variadic functions correctly

* clean up tasks in OpCall handling, add tests for variadic closures

* cleanup for pr

- add syntax documentation
- cleanup parseIdentList
- cleanup OpCall handling for functions and closures
- cleanup tests
2019-04-25 21:28:27 -07:00
Daniel
2e0ea3a4c1
update syntax documentation (#186)
* Update tutorial.md

* Update tutorial.md

* Update tutorial.md

* Update tutorial.md

* Update tutorial.md

add logical operators, assignment operators, increment operators

* wip

* wip

* update
2019-04-18 23:33:23 -07:00
earncef
1ca10a7e3f Added formatting docs (#187) 2019-04-14 13:14:44 -07:00
earncef
bb07fa15b7 text.trim, text.pad_left and text.pad_right (#183)
* Added trim, pad_left and pad_right to text

* Check MaxStringLen

* Added doc

* Fixed doc

* Moved length check
2019-04-11 00:23:30 -07:00
earncef
0ae9a66e26 Fixed interoperability doc (#174) 2019-04-08 19:51:26 -07:00
Daniel
2cde0eaeea
json module faster implementation (#173)
* json module faster implementation

* add some decoding error test
2019-04-06 05:25:23 -07:00
Daniel
2f86800724
'enum' module (#166)
* 1. adding more methods to enum module
2. added ModuleMap.AddMap()
3. added bytes iterator

* add builtin functions 'is_enumerable' and 'is_array_like'

* builtin function 'is_iterable'

* first iteration on 'enum' module

* fix 'is_iterable' builtin function
2019-03-27 01:27:59 -07:00
Daniel
2b21c29bd3
update builtin function documentation (#159)
* Update builtins.md

* Update builtins.md

* Update builtins.md
2019-03-22 09:27:34 -07:00
Daniel
3c30109cd0
fix bytecode encoding/decoding of builtin modules (#154)
* fix bytecode encoding/decoding of builtin modules

* Bytecode.Decode() to take map[string]objects.Importable

* add objects.ModuleMap

* update docs

* stdlib.GetModuleMap()
2019-03-20 01:28:40 -07:00
Daniel
61890b15cb
module refactor (#148)
* wip

* move print and JSON functions to modules

* builtin functions are not replacable now

* builtin functions are added for default nil symbol table

* importables: builtin modules and source modules

* refactoring runtime tests

* fix tests

* update documentation

* cleanup

* clean up cli

* fix REPL prints
2019-03-18 08:15:26 -07:00
earncef
ebddfd13a7 Added println (#144)
* Added println

* Fixed tests.

* Updated doc

* Fixed doc

* Cleanup

* Added size limit

* Fixed incorrect type

* Cleanup

* Consistent output for print and println
2019-03-16 00:14:22 -07:00
Daniel
b7977a419b
add Compiled.Clone to make them safe for concurrent execution (#134) 2019-03-08 01:10:49 -08:00
Daniel
e93f6f6325
limit max object allocations (#129)
- add object.NumObjects()
- add object allocation limit in VM
- delete objects.Break, objects.Continue, objects.ReturnValue
- add Script.SetMaxAllocs()
- update sandbox documentation
- add some tests
- remove duplicate values in compiled constants (fixes #96)
- option to limit the maximum number of objects in compiled bytecode constants
2019-03-06 17:20:05 -08:00
earncef
a3735846a5 Updated docs for SetBuiltinFunctions and SetBuiltinModules (#131)
* Updated docs for SetBuiltinFunctions and SetBuiltinModules

* minor update
2019-03-04 11:53:09 -08:00
earncef
c437def4a0 Decoupled stdlib from vm, script and compiler (#126)
* Decoupled stdlib from script

* Decoupled compiler and vm from stdlib

* cleanup

* Docs and cleanup

* main package with and without stdlib

* cleanup

* Update .goreleaser
2019-03-04 10:21:39 -08:00
Daniel
68cd38e49e
minor doc update
1. composite types -> compound types (#128)
2. composite assignment -> compound assignment
2019-03-03 15:21:28 -08:00
earncef
7cc683e867 SetBuiltinFunctions and SetBuiltinModules (#120)
* `SetBuiltinFunctions` and `SetBuiltinModules`

* nil implies no built in functions.

* Additional tests.

* Cleanup

* Updated SetBuiltinFunctions

* Docs updated.
2019-02-28 08:26:25 -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
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
R.I.Pienaar
06c7e7df61 add os.readfile() 2019-02-07 21:58:47 +01:00
R.I.Pienaar
69961de7de add os.stat() and file.stat() 2019-02-06 15:20:41 +01:00
Daniel Kang
90aafc8bb4 Add 'is_function' and 'is_callable' builtin functions 2019-02-03 15:50:40 -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
9e73f40485 1. Added documentation on operators. 2. Add (char)-(int) operators 2019-02-01 16:58:44 -08:00
Daniel Kang
4f4646032c Update documentation for compiled scripts 2019-02-01 11:25:57 -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
64d99807d8 remove unused code for tuple value return 2019-01-30 02:01:44 -08:00
Daniel Kang
b19d9de0bf update CLI documentation 2019-01-30 01:23:26 -08:00
Daniel Kang
a9aa8dc673 update documentation 2019-01-30 01:05:35 -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
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
Chyroc
d413d2ffe7 feat: add builtin function: type 2019-01-28 13:19:03 +08:00
Daniel Kang
bb9f375321 update documentation 2019-01-27 17:33:24 -08:00
Daniel Kang
bbc76a0228 add 'to_json' and 'from_json' to builtin documentation 2019-01-26 06:40:13 -08:00
Daniel Kang
85001be9b8 implement immutable array and map 2019-01-25 14:54:58 -08:00
Daniel Kang
19498da491 adding immutable value (incomplete) 2019-01-24 19:31:17 -08:00
Daniel Kang
37016f4e17 add 'printf' and 'sprintf' builtin functions 2019-01-24 16:38:04 -08:00