Releases: open2b/scriggo
v0.54.0
Changes
- compiler/checker: don't consider 'make(...)' a constant function call (breaking change)
- runtime: implement range over channels
- all: add 'else' statement to the 'for in' and 'for range' statements (breaking change)
- scriggo: update dependencies
Optimizations
- compiler/emitter, runtime: simplify 'for range' instruction with 'break'
Fixes
- compiler/checker: fix terminating statements
- ast: add '(*Block).String' method
- ast/utils: don't panic '(*dumper).Visit' if a block has nil position
v0.53.5
Fixes
-
compiler/checker: fix const shift expression with untyped left operand
-
compiler/emitter: fix panic involving operations on pointer values
-
compiler/checker: return error in case of parenthesis around ident on :=
-
compiler/checker: fix call to 'setValue'
-
compiler/parser: fix error message on not existent path
v0.53.4
Fixes
-
compiler/emitter,runtime: fix addressability of values read by GetVar
Invalid behavior occurred when assigning to slices, pointers, or maps at the package level.
-
compiler/disassembler: fix panic disassembling 'MapIndex' operation
Disassembling code with an index expression on a map resulted in a panic.
v0.53.3
Fixes
-
builtin: fix time tests
Time tests depended on the local time zone and passed only in CET time zone.
-
compiler/checker: fix panic on redeclared as imported package name
If a native imported package name was redeclared, an internal error would occur instead of returning a 'redeclared as imported package name' error.
v0.53.2
Optimizations
-
compiler/emitter: optimize
{{ render .. }}
This change optimizes the
show
statement with arender
expression, generating fewer virtual machine instructions and fewer memory allocations.
Fixes
-
cmd/scriggo: fix package name in file generated by the Import command
The scriggo command could generate an invalid Go file.
Thanks to @traetox for the contribution. -
compiler,runtime: fix builtin
delete
when key value has Scriggo typeUsing the
delete
builtin with a type declared in the interpreted source code, a runtime panic occurred.
v0.53.1
Optimizations
- cmd/scriggo: improve 'run' execution time using an I/O buffer
- compiler/emitter: reuse registers after emitting 'show' statement
Fixes
- compiler/checker: fix conversion from untyped int constant to float64
- compiler/parser: fix parsing of literal numbers
- compiler/builder: fix 32-bit compilation of Scriggo
v0.53.0
This version breaks the compatibility with previous versions.
Implement the 'scriggo run' command.
The new Run command executes a template file and its extended, imported and rendered files:
$ scriggo run index.html
All Scriggo builtins are available in template files. See the scriggo command for the complete syntax.
Discard shebang line in templates (breaking change).
Discards a shebang line in a template file. In this way the template file can have a shebang as first line:
#!/usr/bin/scriggo run
{% extends "layout.html" %}
{% Article %}
Fix BuildTemplate to get the format from a FormatFS file system.
If a file system implements the FormatFS interface, Scriggo calls its Format method to get the file format.
This didn't work and this release fixes it.
Other relevant commits
- all: improve documentation about contribution and testing
- compiler/checker: fix setValue in case of Scriggo defined complex type
- compiler/emitter: fix changeRegister in case of conversion
v0.52.2
v0.52.1
v0.52.0
This version breaks the compatibility with previous versions.
Add scriggo command binaries.
Starting from this version, the binaries of the scriggo command are available on GitHub.
Replace env.Exit with env.Stop (breaking change).
This change replaces the Exit method of the native.Env interface
with the Stop method. The Stop method has the same behaviour of
Exit but accepts an error instead of a status code.
The following code:
env.Exit(0)
env.Exit(2)
with this change, can be rewritten as
env.Stop(nil)
env.Stop(scriggo.NewExitError(2, nil))
Add the unsafeconv package as built-in in templates.
Other relevant commits
- highlighters/highlight.js: update the README
- scriggo: document 'Run' methods can be called concurrently
- scriggo, scripts: fix documentation of the Run methods on panics
- builtin: fix 'ParseTime' and 'Time.Format' documentation
- scriggo, scripts: fix documentation of 'PanicError' types
- builtins: revise parameter names and documentation
- scriggo: document that 'UsedVars' may not return variables in dead code