]> ocean-lang.org Git - ocean/commit
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)
commit3a83d91ef3b37d50680c15c00fc4ee44cb70c6ea
treec7c4388838df51cee181b20147157f2814ae1f15
parent71eaad4b0515c97316a320d38e54d9e9a8f25b50
oceani: change NEWLINE parsing in statements to new model.

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>
csrc/oceani.mdc