* Implement borrowed pointers
* Implement biased refcounting for borrowed pointers
+# Improvements or Notes
+* Uninited local idents and constants will have version==0
export = accept(p, '*');
sym = symbol_new(p, 0, name, SYM_CONST, export);
expect(p, '=');
+// AstNode* block = ast_block();
+// expression(p, block);
+// sym->value = ast_lastval(block);
+// check_const(sym->value);
sym->value = expression(p);
sym->type = sym->value->hdr.type;
}
if (accept(p, BEGIN))
{
- AstNode* block = statement_seq(p);
- ast_print(p, block);
- (void)block;
+// p->curr_join = ast_block();
+// if (!matches(p, END))
+// {
+// AstNode* block = ast_block();
+// statement_seq(p, block);
+// ast_print(p, block);
+// }
+ if (!matches(p, END))
+ {
+ AstNode* block = statement_seq(p);
+ ast_print(p, block);
+ (void)block;
+ }
expect(p, END);
}
# return z1;
#end
-procedure Bar*(a : Int) : Int
-begin
- return a;
-end
-
-procedure Baz*(a : Int)
-begin
- if (1 > 2) then
- 42;
- else
- 24;
- end
-end
+#procedure Bar*(a : Int) : Int
+#begin
+# return a;
+#end
+#
+#procedure Baz*(a : Int)
+#begin
+# if (1 > 2) then
+# 42;
+# else
+# 24;
+# end
+#end
begin
- h[1].i = 42;
+# h[1].i = 42;
# a = true;
# a = A;
# b = 24;
# b = -b;
#
# # Arithmetic ops
- c = b + 1;
+# c = b + 1;
# c = b - 1;
# c = b * 1;
# c = b / 1;
# c = 42;
# c = 24;
- Bar(Foo.testint);
- Bar(Bar2.testint);
- Bar(Bar3.testint);
+# Bar(Foo.testint);
+# Bar(Bar2.testint);
+# Bar(Bar3.testint);
end