fostr/trans/util.str
Glen Whitney 2e49065031 feat: Implement enters operator >> (#8)
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>
2021-02-01 01:46:31 +00:00

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]]