v1.0.0
Added
-
Context support
AddedProcessStringWithCtxandProcessBytesWithCtxmethods, andWithContextbuilder option. The event loops now checkctx.Done()to support cancellation (timeouts, HTTP request termination, etc.). -
Generic command handlers
Command signature changed fromfunc([]interface{}) errortocore.CommandType[E, N any] func(*E, N) error. Handlers now receive concrete engine and node types, eliminating type assertions and improving safety and readability. -
Automatic bytecode index shift
NewCommandBytenow acceptsautoBytecodeIdxShiftflag. Whentrue, the engine automatically increments the instruction pointer after command execution. This simplifies linear instructions while keeping full control for jumps. -
Colored output for errors and logs
Integratedtap/color– all error messages and logs are now color‑coded. Color can be enabled globally viaWithColors()in the builder. -
Initial unit tests
Added tests forGenerator, byteParser1, andLexer. More coverage will follow in future releases. -
Comprehensive documentation
README fully rewritten with quick‑start examples for both engine types, API reference, production usage tips, and reserved scope keys. -
Context‑aware processing
ProcessStringWithCtxandProcessBytesWithCtxallow explicit context passing.
Changed
-
Event system refactored
All event handlers now accept*core.Eventsas a second argument, giving access to scope and context directly inside the handler. -
EngineUniversal simplified
Opcode counter moved to a plainopcode_counterfield instead of the nestedanotherstruct. -
Error reporting improved
Errors now include command number, bytecode index, and original source line with color formatting for quick debugging. -
Thread safety
Added mutexes toByteEngineandStringEngineto ensure correct behaviour under concurrent access (command registration + execution).
Fixed
- Fixed negative index handling in
Shifter(now correctly bounds‑checked). - Fixed panic when command handler missing – now returns a clear error.
- Fixed data races in scope access (mutexes added in generator and logger).
Removed
- Removed deprecated
engine.Converts– no longer needed due to generics. - Removed unused type conversion utilities.