]> ocean-lang.org Git - ocean/commitdiff
oceani: change NEWLINE parsing in statements to new model.
authorNeilBrown <neil@brown.name>
Sun, 16 Jun 2019 00:16:07 +0000 (10:16 +1000)
committerNeilBrown <neil@brown.name>
Sun, 16 Jun 2019 00:33:49 +0000 (10:33 +1000)
The new module is:

 A list of line-like things must access a newline first:
  Statementlist -> Statements
                | NEWLINE Statementlist

 Any line-like thing must reduce to a single symbol:
   SimpleStatementLine IfPart WhilePart CasePart etc
 An individual line-like thing must allow following newlines
 e.g.
   IfHead -> if Expression Block
           | IfHead NEWLINE

 A block that can be multi-line or single-line should be marked with
   $$NEWLINE
 This will require a NEWLINE to reduce it, but won't swollow the newline.

Signed-off-by: NeilBrown <neil@brown.name>

No differences found