]> ocean-lang.org Git - ocean/commit
oceani: allow types to be used before declaration
authorNeilBrown <neil@brown.name>
Sat, 4 Dec 2021 23:34:58 +0000 (10:34 +1100)
committerNeilBrown <neil@brown.name>
Sat, 4 Dec 2021 23:40:08 +0000 (10:40 +1100)
commita0ff449bc7dff46460913fc7b1a379fb71db866b
treeb7078ab83cb21d54af8971da88681c7a7a8b937f
parente4967da39aff091cd9dfa187cf77c84ba8643293
oceani: allow types to be used before declaration

As we prepare all types after parsing, we can now use a type before it
is declared.
We need to be careful of mutually recursive structures, and
we need to retry prepare_type if it fails because a needed
member hasn't been prepared yet.

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