Commit Graph

261 Commits (36ec47cd203a1f119da74b868ceb92f6da7ea930)

Author SHA1 Message Date
Alexander Medvednikov 36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
playX b842e89acc
all: initial implementation of compile-time types (#13549) 2022-02-21 17:42:54 +02:00
Delyan Angelov 799c95dc4e
tests: filter test_ fns with params from the list of automatically run test functions (fix #13443) 2022-02-12 17:30:20 +02:00
Tim Basel 9d0a5942ac
builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
Delyan Angelov 9ed18efa53
checker: error on redefining any of the public builtin functions, not just ['print', 'println', 'eprint', 'eprintln', 'isnil', 'panic', 'exit'] (#13419) 2022-02-10 12:26:30 +02:00
yuyi 291a1ffd8d
token: rename Position to Pos, rename position() to pos() (#13279) 2022-01-26 12:36:28 +02:00
yuyi ca1f675dba
ast, checker, cgen: implement if guard with multi return optional (#13273) 2022-01-25 14:36:33 +02:00
Delyan Angelov fa6f7d4c83
os: add os.quoted_path/1, use it consistently for running V itself 2022-01-22 21:13:28 +02:00
playX 7fe62a8b3e
js,os: fix `return` in `or` blocks; Properly get path_delimiter and path_separator in JS (#13179) 2022-01-15 09:55:03 +02:00
playX 104e0c5692
js: fix break and continue in or blocks (#13165) 2022-01-14 18:43:18 +02:00
Delyan Angelov d3489d4246
builtin: s.trim_prefix/1 -> s.trim_string_left/1, s.trim_suffix/1 -> s.trim_string_right/1 2022-01-05 12:49:22 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Delyan Angelov 41e763f79c
checker: add error for `type StructAlias = Struct struct Struct { field StructAlias }` 2022-01-02 15:54:40 +02:00
pancake 7b4ba66720
js: use JS.String instead of string in builtin javascript functions (#13004) 2022-01-01 09:17:08 +02:00
Delyan Angelov 43fee6b3d5
all: fix registration of methods with the same name on different generic structs 2021-12-28 21:42:48 +02:00
playX a2468e1e0c
js,os: fix integer arithmetic; add Process.close() and os.is_readable() for VJS; Make tetris run on JS backend (#12940) 2021-12-23 11:36:42 +02:00
playX 2b9f993574
gg: add text rendering, keyboard event handling for JS and other fixes (#12932) 2021-12-22 12:26:52 +02:00
pancake cb65f2ff44
js: generate es5 methods for valueOf() and toString() (#12928)
Co-authored-by: pancake <pancake@nopcode.org>
2021-12-22 09:20:45 +02:00
playX b68c217d53
js: remove usage of default arguments for `-es5` flag (#12921) 2021-12-21 20:23:40 +02:00
playX 5f0160bf11
js,gg: more work on porting gg to JS backend (#12903) 2021-12-20 16:18:21 +03:00
yuyi cd0b581445
ast: rename 'table.get_type_symbol()' to 'table.sym()' and more related calls (#12898) 2021-12-19 18:25:18 +02:00
pancake 08766da7e8
js: dont use async js_main in '-es5' mode (#12870) 2021-12-17 16:37:19 +02:00
playX 11d2b8b354
js: support `-es5` flag (#12846) 2021-12-15 15:47:34 +02:00
playX b116170735
js: add support for Promise.wait() (#12781)
* builtin/js: Change Promise<T,E> to Promise<T>

* js: codegen support for Promise.wait()

* checker: checker support for Promise.wait()
2021-12-10 14:54:20 +02:00
playX 1cb06a2de4
js: ast.GoExpr support using promises on JS backend (#12749) 2021-12-07 12:11:54 +03:00
playX 105d7fcf75
js: support JS.await (#12726) 2021-12-05 13:33:53 +02:00
yuyi 0f50ac3260
ast: cleanup struct embeds related methods (#12719) 2021-12-04 18:46:41 +02:00
yuyi 547f326f33
cgen: cleanup auto_str_methods (#12631) 2021-11-30 19:39:55 +02:00
playX ddec89f9ee
js,vfmt: fix formatting for JS types; add fetch API (#12608) 2021-11-29 15:32:29 +02:00
playX f584e70cf2
js: add fixes for generic structures and functions; add promise API; refactor modules (#12575) 2021-11-25 16:49:53 +02:00
playX b0bc112168
jsdom, examples: add more WebGL APIs; add interactive 3D cube example running on VJS (#12562) 2021-11-24 20:31:39 +02:00
zakuro 93bdff5589
fmt: remove unnecessary paren in assert stmt (#12546) 2021-11-23 07:30:54 +02:00
playX 243e66a106
js,jsdom: Canvas & context API; Added TypeSymbol.is_js_compatible & temporary hacks for JS ifaces (#12526) 2021-11-20 21:28:11 +02:00
playX 1edb3e559e
js,jsdom: make JS structs plain objects; add more DOM API support for jsdom (#12501) 2021-11-18 10:09:53 +02:00
playX 2eb02ff5a7
jsdom, js: start refactoring jsdom; improve JS interfaces; add two attributes for them (#12488) 2021-11-17 11:41:33 +02:00
yuyi 5a89c0a480
ast: change CompFor to ComptimeFor (#12482) 2021-11-17 08:29:43 +02:00
yuyi c28041cecc
all: cleanup/rename all `comp_` names to be `comptime_` (#12467) 2021-11-15 15:47:29 +02:00
playX a8a1e9381f
strconv,js: f64_to_str works on JS backend now; Fix BigInt usage in infix expressions (#12464) 2021-11-15 14:13:44 +02:00
Delyan Angelov 1d2b16dde2
js: support `[if userflag?]` fn tags 2021-11-15 13:23:27 +02:00
playX e3d98b1b28
js,strconv: port some functions to JS backend, improve `rune.str()` (#12460) 2021-11-14 21:06:58 +02:00
playX 6c32c544e1
js,parser: allow declaring methods on JS interfaces for easier FFI (#12447) 2021-11-13 11:08:17 +02:00
playX a4c57ba56e
js: support JS interfaces (#12426) 2021-11-11 14:36:32 +02:00
playX 194b3647e2
js,checker: allow casting JS primitives to V primitives and vice-versa (#12420) 2021-11-10 11:37:16 +02:00
playX a32dae335a
js: fix interfaces behaviour & disable struct deep copy for now (#12333) 2021-10-29 11:23:40 +03:00
playX fa02418a55
js: copy variables passed to closures (#12328) 2021-10-28 19:31:56 +03:00
playX cfecb62299
js: DOM API. Part 1 (#12296) 2021-10-27 23:18:09 +03:00
playX 2eae4cf63e
js: fix optional error propagation (#12283) 2021-10-24 15:56:44 +03:00
playX 864d6eae6b
js: codegen & vlib fixes, replace the Game of Life CLI example (#12272) 2021-10-22 22:03:19 +03:00
ChAoS_UnItY 5b69593766
cgen,js: fix missing break in switch case, generated by match with range branches (#12260) 2021-10-21 22:30:05 +03:00
ChAoS_UnItY ab350d52ec
cgen: support RangeExpr while emitting enum switch case (#12226) 2021-10-19 17:02:22 +03:00