aboutsummaryrefslogtreecommitdiffstats
path: root/clox/src/compiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'clox/src/compiler.c')
-rw-r--r--clox/src/compiler.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clox/src/compiler.c b/clox/src/compiler.c
index 18ad4a7..bfa0a96 100644
--- a/clox/src/compiler.c
+++ b/clox/src/compiler.c
@@ -335,6 +335,10 @@ static void dot(bool canAssign) {
if (canAssign && match(TOKEN_EQUAL)) {
expression();
emitBytes(OP_SET_PROPERTY, name);
+ } else if (match(TOKEN_LEFT_PAREN)) {
+ uint8_t argCount = argumentList();
+ emitBytes(OP_INVOKE, name);
+ emitByte(argCount);
} else {
emitBytes(OP_GET_PROPERTY, name);
}