• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wegamekinglc / Derivatives-Algorithms-Lib / 31931580161

16 Aug 2026 06:30AM UTC coverage: 89.62% (-0.3%) from 89.874%
31931580161

push

github

web-flow
feat: add script product JSON and tree debug dumps (#293)

* Add JSON and Unicode tree dumps for script products

The legacy s-expression debug dump only serves plain terminals. The
debugger now builds a small IR per statement and renders three formats
from it: the legacy text (byte-identical), a deterministic versioned
JSON schema (dal.script-product/1) for machine consumers such as web
front ends and bindings, and a width-aware Unicode tree with an ASCII
fallback for humans. The two new dumps also include past events, and
the dal-public wrappers run IndexVariables on a private copy so
indices, the variable table, and the payoff slot are resolved without
restructuring the parsed AST.

* Fix review and static-analysis findings on the debug dumps

- Replace a mixed-type ternary in TreeParen that clang and gcc reject
  (base_t and String_ branches both convert to each other, so the
  conditional operator has no common type; MSVC accepted it)
- Pass JSON string bytes through as unsigned char so multi-byte UTF-8
  is emitted verbatim instead of being \u-escaped per byte on platforms
  with signed char
- Parenthesize a pow operand under unary negation; "−a ^ b" reads as
  either −(a ^ b) or (−a) ^ b
- Construct a fresh Debugger_ per statement so the IR of earlier
  statements does not pile up on the visitor stack during a dump
- Keep the dal-public dump helper out of the core Dal::Script namespace
  (Dal::Detail instead)
- Split the inline/tree/JSON renderers into per-family helpers and
  table-driven precedence/width lookups to bring every function under
  the complexity budget Codacy enforces; rendering output is unchanged
  and pinned by tests, now including the neg-pow and UTF-8 cases

* Bring the debug renderers under the complexity limit

Split the seven functions Codacy flagged (lizard cyclomatic complexity
above 8) into per-family helpers: JSON field emitters, if-statement
inline and branch builders, and symbol lookups replace the compound
conditio... (continued)

363 of 469 new or added lines in 3 files covered. (77.4%)

1 existing line in 1 file now uncovered.

10067 of 11233 relevant lines covered (89.62%)

2440356.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.44
/dal-cpp/dal/script/event.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc