mirror of
https://github.com/TangentFoxy/etlua.git
synced 2025-07-28 02:52:17 +00:00
concat is done outside of compiled func
This commit is contained in:
@@ -134,7 +134,12 @@ class Parser
|
||||
return nil, err unless success
|
||||
fn, err = @load @chunks_to_lua!
|
||||
return nil, err unless fn
|
||||
(...) -> @run fn, ...
|
||||
(...) ->
|
||||
buffer, err = @run fn, ...
|
||||
if buffer
|
||||
concat buffer
|
||||
else
|
||||
nil, err
|
||||
|
||||
parse: (@str) =>
|
||||
assert type(@str) == "string", "expecting string for parse"
|
||||
@@ -228,7 +233,7 @@ class Parser
|
||||
else
|
||||
error "unknown type #{t}"
|
||||
|
||||
push "return _concat(_b)"
|
||||
push "return _b"
|
||||
concat buffer, "\n"
|
||||
|
||||
compile = Parser!\compile
|
||||
|
Reference in New Issue
Block a user