]> ocean-lang.org Git - ocean/commitdiff
oceani: := is no longer a token.
authorNeilBrown <neil@brown.name>
Sun, 28 Apr 2019 00:24:38 +0000 (10:24 +1000)
committerNeilBrown <neil@brown.name>
Wed, 1 May 2019 08:07:28 +0000 (18:07 +1000)
It was always intended that a type could come between
the : and = of a declaration.
It makes more sense, and simplifies the grammar, if
we stop treating  := as ever being a token.
So now : and = are separate tokens.
If the parse sees ":=", it will happily treat that
as two separate tokens, which is what we want.

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

index 430c29f2c8c23a58ec75f670083af281ae997040..df9a5c5f1847349088d5e1ceba95343a8cb4fe22 100644 (file)
@@ -1589,7 +1589,7 @@ link to find the primary instance.
 ###### Grammar
 
        $*var
-       VariableDecl -> IDENTIFIER := ${ {
+       VariableDecl -> IDENTIFIER : = ${ {
                struct variable *v = var_decl(config2context(config), $1.txt);
                $0 = new_pos(var, $1);
                $0->var = v;
@@ -1604,7 +1604,7 @@ link to find the primary instance.
                                 v->where_decl, Tnone, 0, Tnone);
                }
        } }$
-           | IDENTIFIER ::= ${ {
+           | IDENTIFIER :: = ${ {
                struct variable *v = var_decl(config2context(config), $1.txt);
                $0 = new_pos(var, $1);
                $0->var = v;