diff options
Diffstat (limited to 'compilation/transform.e')
| -rw-r--r-- | compilation/transform.e | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compilation/transform.e b/compilation/transform.e index 80ef98b..5b84009 100644 --- a/compilation/transform.e +++ b/compilation/transform.e @@ -1447,7 +1447,7 @@ allocate-transformation-state s" transformation-state" variable ~ more complex. ~ ~ (output buffer start, output point, input string pointer -~ -- output buffer start, output point) +~ -- output buffer start, output point, final entry pointer) : label-transform ~ : blank-line ~ : blank-line @@ -1499,12 +1499,13 @@ allocate-transformation-state s" transformation-state" variable ~ When the loop is done, get the real values of "here" and "latest" ~ back. The internal "here" is also the output point, and will become our - ~ return value. The internal "latest" is discarded. + ~ return value. The internal "latest" is returned as a result. { transformation-state transformation-state-output-buffer-start @ here @ + latest @ 3unroll transformation-state transformation-state-saved-here @ here ! transformation-state transformation-state-saved-latest @ latest ! - ~ (output buffer start, output point) + ~ (final entry pointer, output buffer start, output point) ~ Though we don't actually use transformation-state outside of this ~ invocation, for tidiness we zero it out. @@ -1515,6 +1516,9 @@ allocate-transformation-state s" transformation-state" variable ~ Also put the input source back how it was. main-input-buffer pop-input-buffer + 3roll 2 pick - + ~ (output buffer start, output point, final entry offset) + exit } if } forever ; |