From 6236078d2da8c4a3bf686e2583315c199e869c8c Mon Sep 17 00:00:00 2001 From: Fabien Fleutot Date: Tue, 3 Feb 2009 21:05:23 +0100 Subject: [PATCH] mlp.chunk.transformers had disappeared because mlp.chunk wasn't a regular parser anymore --- src/compiler/mlp_misc.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/mlp_misc.lua b/src/compiler/mlp_misc.lua index b76b136..c09483d 100644 --- a/src/compiler/mlp_misc.lua +++ b/src/compiler/mlp_misc.lua @@ -171,7 +171,7 @@ function skip_initial_sharp_comment (lx) if i then lx.i, lx.column_offset, lx.line = i, i, lx.line+1 end end -function chunk (lx) +local function _chunk (lx) if lx:peek().tag == 'Eof' then return { } -- handle empty files else skip_initial_sharp_comment (lx) @@ -179,4 +179,7 @@ function chunk (lx) if lx:peek().tag ~= "Eof" then error "End-of-file expected" end return chunk end -end \ No newline at end of file +end + +-- chunk is wrapped in a sequence so that it has a "transformer" field. +chunk = gg.sequence { _chunk, builder = unpack } \ No newline at end of file -- 2.44.0