]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani: prepare for adding new types with new syntax.
[ocean] / csrc / oceani.mdc
index 68e5b603038a94b4ab27bbd739f671e12bf104de..9ab456a629badad65780a72cc1d10e366cd29ced 100644 (file)
@@ -580,6 +580,17 @@ which are often passed around by value.
                return rv;
        }
 
+###### forward decls
+
+       static void free_value(struct value v);
+       static int type_compat(struct type *require, struct type *have, int rules);
+       static void type_print(struct type *type, FILE *f);
+       static struct value val_init(struct type *type);
+       static struct value dup_value(struct value v);
+       static int value_cmp(struct value left, struct value right);
+       static void print_value(struct value v);
+       static struct value parse_value(struct type *type, char *arg);
+
 ###### free context types
 
        while (context.typelist) {
@@ -1732,6 +1743,7 @@ link to find the primary instance.
                }
        } }$
 
+       $*exec
        Variable -> IDENTIFIER ${ {
                struct variable *v = var_ref(config2context(config), $1.txt);
                $0 = new_pos(var, $1);
@@ -1744,7 +1756,7 @@ link to find the primary instance.
                                v->where_set = $0;
                        }
                }
-               $0->var = v;
+               cast(var, $0)->var = v;
        } }$
 
        $*type