Compare commits

..

No commits in common. "d69365ba9266d4817a9fa0dbebc1392f9e677b79" and "126bd476d625c1be376eaf88f522557186dde393" have entirely different histories.

2 changed files with 4 additions and 6 deletions

View file

@ -48,21 +48,20 @@ pub fn printNode(node: *const Node, ident: usize) void {
const typ = method.typ.lexeme; const typ = method.typ.lexeme;
if (method.mutable) { if (method.mutable) {
warn("(method mut {} {} {} {} (", vari, typ, name, ret_type); warn("(method mut {} {} {} {} ", vari, typ, name, ret_type);
} else { } else {
warn("(method {} {} {} {} (", vari, typ, name, ret_type); warn("(method {} {} {} {} ", vari, typ, name, ret_type);
} }
} else { } else {
warn("(fn {} {} (", name, ret_type); warn("(fn {} {} (", name, ret_type);
} }
for (decl.params.toSlice()) |param| { for (decl.params.toSlice()) |param| {
warn(" ({} {})", param.name.lexeme, param.typ.lexeme); warn("({} {}) ", param.name.lexeme, param.typ.lexeme);
} }
warn(") ");
printBlock(ident + 1, decl.body, false); printBlock(ident + 1, decl.body, false);
warn("\n"); warn(")\n");
}, },
.ConstDecl => |consts| { .ConstDecl => |consts| {

View file

@ -679,7 +679,6 @@ pub const Parser = struct {
while (self.peek().typ != .RightBrace) { while (self.peek().typ != .RightBrace) {
var stmt = try self.parseStmt(); var stmt = try self.parseStmt();
printer.printNode(try self.mkStmt(stmt), 0); printer.printNode(try self.mkStmt(stmt), 0);
_ = try self.consumeSingle(.Semicolon);
try stmts.append(stmt.*); try stmts.append(stmt.*);
} }