mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 15:57:49 +00:00
Docs: script stack frames and $.fileName name the file of the code
docs/mcp.md's line and stack row said $.stack shows at most 64 lines and uses [global] only for the script's own code. It keeps the innermost 64 frames after a leading line "…" when some are left out, and [global] names any code outside a function, including code that an included file, $.evalFile or eval runs. The row now also says how a frame's file compares with $.fileName in each case: the same file for code from a file, the run's name where $.fileName is empty for a script given as source, [eval] where $.fileName is the file being run, and [unknown] at line 0 where $.fileName is empty. The engineName row now gives the #targetengine name, and the script.run params text, the script module doc and the Scripts evidence line say $.fileName is the file of the code that reads it rather than the file being run.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
//! Before a run starts, its preprocessor lines are read ([`include`]): included files take the
|
||||
//! place of their lines, and an error in one is reported at its own file, line and column.
|
||||
//! `$.evalFile(path)` runs another file in the same global environment and gives its last value,
|
||||
//! `$.fileName` is the file being run and `$.includePath` the `#includepath` list.
|
||||
//! `$.fileName` is the file of the code that reads it and `$.includePath` the `#includepath` list.
|
||||
//!
|
||||
//! A run writes to the Script Console with `$.write` and `$.writeln`, and `vc.log` adds a line
|
||||
//! there too. The session's console gets a start line, the run's output, its uncaught error, an end
|
||||
|
||||
Reference in New Issue
Block a user