Tweak ast from sequences in ebnf

db4
Chris Double 2008-04-02 15:47:21 +13:00
parent 1b58ba404e
commit bbcc84862f
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ M: ebnf-rule (transform) ( ast -- parser )
] keep ;
M: ebnf-sequence (transform) ( ast -- parser )
elements>> [ (transform) ] map seq ;
elements>> [ (transform) ] map seq [ dup length 1 = [ first ] when ] action ;
M: ebnf-choice (transform) ( ast -- parser )
options>> [ (transform) ] map choice ;