forked from glen/fostr
Glen Whitney
2e49065031
Also adds parenthesization of fostr expressions. Recasts code generation in terms of bottomup processing of a local strategy. Resolves #1. Co-authored-by: Glen Whitney <glen@studioinfinity.org> Reviewed-on: glen/fostr#8 Co-Authored-By: Glen Whitney <glen@nobody@nowhere.net> Co-Committed-By: Glen Whitney <glen@nobody@nowhere.net>
10 lines
222 B
Plaintext
10 lines
222 B
Plaintext
module util
|
|
imports libstrategolib
|
|
|
|
rules
|
|
join(|infix) : [] -> ""
|
|
join(|infix) : [x | xs] -> $[[x][<prejoin(|infix)>xs]]
|
|
|
|
prejoin(|infix) : [] -> ""
|
|
prejoin(|infix) : [x | xs] -> $[[infix][x][<prejoin(|infix)>xs]]
|