Commit Graph

16 Commits

Author SHA1 Message Date
Glen Whitney 2514f0df98 fix: handle the TermEx->OptTermEx injection in Statix 2021-02-17 19:47:29 -08:00
Glen Whitney f93499acfd feat: Add typing for Sequence() operation
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.
2021-02-17 11:20:26 -08:00
Glen Whitney 804a00902a feat: Type-dependent Haskell code generation
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).
2021-02-16 09:46:12 -08:00
Glen Whitney 5cd75b8177 feat: Initial statix assignment of types to expressions 2021-02-14 10:25:23 -08:00
Glen Whitney b3f9cdf372 docs: Add statics development documentation
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.
2021-02-12 17:08:55 -08:00
Glen Whitney 904f651897 feat: Add syntax for string literals
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.
2021-02-11 10:02:43 -08:00
Glen Whitney c516ed6d7f refactor: eliminate rule in desugar
By using list wrap properly.
2021-02-10 13:07:51 -08:00
Glen Whitney 02cf762ac7 Merge pull request 'feat: Allow expressions to be terminated/sequenced by ;' (#15) from semi_separate into main
Resolves #4.

Reviewed-on: glen/fostr#15
2021-02-10 21:02:39 +00:00
Glen Whitney b9c8532899 feat: Allow expressions to be terminated/sequenced by ;
Note that ultimately a terminated sequence may have
   a slightly different semantics (applying streams
   to `_|_`, most likely) but for now they don't.
2021-02-10 12:47:34 -08:00
Glen Whitney 991976d3a8 feat: sequencing of expressions with newline to same indent (#11)
feat: sequencing of expressions with newline to same indent

  Also revised README to reflect greater emphasis on streams.
  Haskell code generation unsurprisingly required a fairly significant
  rework.

  Resolves #3.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Reviewed-on: glen/fostr#11
Co-Authored-By: Glen Whitney <glen@nobody@nowhere.net>
Co-Committed-By: Glen Whitney <glen@nobody@nowhere.net>
2021-02-06 05:11:41 +00:00
Glen Whitney c4d3f66c51 Merge pull request 'feat: Allow indented continuation lines' (#9)
Reviewed-on: glen/fostr#9

Resolves #2.
2021-02-01 08:49:37 +00:00
Glen Whitney eaa06e62eb feat: Allow indented continuation lines
Resolves #2.
2021-02-01 00:29:00 -08:00
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
Glen Whitney 527f802793 docs: Get mkdocs working 2021-01-30 19:48:03 -08:00
Glen Whitney 7b00b01856 chore: Switch to this repository from predecessor 2021-01-30 15:37:53 -08:00
Glen Whitney 9ecfa63f58 init: SDF3/Statix project as initialized by Spoofax 2021-01-30 12:27:10 -08:00