Command cascades should build an AST instead of functions #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Kind of an edge case, but this may happen more easily when using resilient and its style paradigm: Span expansion (in a possible cascade of styling) used the (equivalent of the)
SILE.call("...", ..., function() ... end)
programming paradigm.This does cause an issue actually when some low-level commands there involve input filters or anything working directly on the text element in an AST content (text casing, sub/superscript faking, etc.)
Easy way to cause the issue:
If using such function calls, this either fails with an error (because textsuperscript assumes an AST content, not a function) or doesn't do the expected things anyway.
On the other hand, it does work if we use the
SILE.call("...", ..., { ... })
programming paradigm, i.e build an AST equivalent of what we would have done in the functional approach.Another way (naive):
Bad:
Good (ie. working... but is is so good?)