improve errors, add warnings, add some compile-time optimizations, fix variables, make sure conditionals and loops get booleans, affirm types, keep variables to a single type

This commit is contained in:
Neemek 2025-03-20 12:13:30 +01:00
parent e34b423967
commit b1b8e61f57
Signed by: neemek
GPG key ID: 28360A8951CD0E9B
14 changed files with 435 additions and 118 deletions

View file

@ -77,7 +77,7 @@ func run(_ js.Value, args []js.Value) interface{} {
log.Printf("Parsed tree: %s", tree.String())
compiler := core.NewCompiler()
compiler := core.NewCompiler([]rune(source))
compiler.SetImportsResolver(&JsResolver{
resolver,