#715 JS/HTML code generation: print model state
- Best to review per commit.
- Main change, for JS/HTML code generation:
- Log initial state + state after event transitions.
- For HTML: log panel shows horizontal scrollbar, doesn't wrap. Much easier to read then, in case of long 'state' logging lines.
- Some other related changes as well:
- Fixed
valueToStr
for JavaScriptSymbol
s.Symbol
s are only used for enumeration literals.valueToStr
is used in multiple places, such as:- Error messages such as for index of bounds.
-
fmt
arguments for for%s
and%S
. - String representation of tuple elements.
- Output of print declarations.
- State logging.
- Improved comments in generated code, and text in generated reports, for location pointer variables:
- Include location pointer variables in 'original declaration names' mapping.
- JS/HTML code generation simplifications:
- Simplified code generation of frequency slider code.
- Simplified code generation of logging-related code.
- A 'log' function is always present now, also for JS, not only HTML.
- Prevents having to prefix all JS log calls with 'console.'.
- Unchanged: JS/HTML log to console. Only HTML logs to the log panel.
- Transition logging code is hard-coded in the template now.
- Fixed
Addresses #715