From d55137a7c746e089dbb8eb663c7a328ccb3e5fa0 Mon Sep 17 00:00:00 2001 From: Luna Date: Mon, 26 Aug 2019 13:17:25 -0300 Subject: [PATCH] lift restraint on Calls being only made to Variables --- examples/hello.v | 2 +- src/parser.zig | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/hello.v b/examples/hello.v index 74308b6..11f4c7e 100644 --- a/examples/hello.v +++ b/examples/hello.v @@ -46,5 +46,5 @@ fn main(a int) int { y: 20 } - println(p.x) + println(egg.scramble(3).with(cheddar)) } diff --git a/src/parser.zig b/src/parser.zig index 21b761b..fb7108e 100644 --- a/src/parser.zig +++ b/src/parser.zig @@ -731,11 +731,6 @@ pub const Parser = struct { printer.printExpr(expr); if (self.check(.LeftParen)) { - if (ast.ExprType(expr.*) != .Variable) { - self.doError("cannot call non-variable {}", ast.ExprType(expr.*)); - return Result.CompileError; - } - _ = try self.consumeSingle(.LeftParen); expr = try self.finishCall(expr); } else if (self.check(.Dot)) {