Also move the signature of the semantic sort TYPE into its own
file to facilitate sharing between Statix and Stratego.
(Currently it is shared via symbolic link, but that may cause
problems down the line; if/when it does, will have to look at
physically copying the file into src-gen via an "Additional
build step" using either Stratego or Ant.
Also documents using Statix types from Stratego.
Caveat: type is still not being assigned for the Sequence()
constructor.
Also fixes the parsing of literal strings (whitespace just after
the opening quote was being ignored, and was ambiguous just
before the opening quote).
Hopefully the new section will be helpful, given that it can be
a bit confusing to get started with Statix. With this commit,
the background is established and the stage is set to
dive into type checking.
Also rudimentary code generation. The difficulty
is that for Haskell generation, we need to know
whether an expression is a string or in to send it
to standard output. So we will need to begin
implementation of a type system for fostr.
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>