]> ocean-lang.org Git - ocean/commit - csrc/oceani-tests.mdc
oceani: updates for new approach to parsing indents.
authorNeilBrown <neil@brown.name>
Wed, 10 Mar 2021 01:37:46 +0000 (12:37 +1100)
committerNeilBrown <neil@brown.name>
Wed, 10 Mar 2021 04:31:43 +0000 (15:31 +1100)
commit1dd9f61bbc7e8890b5407ba084793817e55fe502
tree2e8357fdc4b946b06a9be1dff8b948dcc1a6a4ec
parent1b9dd205f5d65b6d89b0e05d51690c8c6cf0f771
oceani: updates for new approach to parsing indents.

Now that IN is a valid stand-alone token, it makes sense to change the
grammar for ocean.
We don't need the ':' before an indent if there is some other terminal
there.  So:

  while
     statements
  do
     statements

doesn't require any ':'.
We use the ':' to separate an expression from following statements,
in 'if' and 'while' and 'case'.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani-tests.mdc
csrc/oceani.mdc