diff options
author | Tom Willemse | 2022-08-14 19:56:32 -0700 |
---|---|---|
committer | Tom Willemse | 2022-08-14 19:56:32 -0700 |
commit | 62858b60e43803477e898c7993e109a94701ce70 (patch) | |
tree | 30d12b56bdf4e489372b68698252d4296fc5be4d /clox/src/compiler.c | |
parent | e91006b59a143ad0083b3fb303a493f9d97e6c9b (diff) | |
download | crafting-interpreters-62858b60e43803477e898c7993e109a94701ce70.tar.gz crafting-interpreters-62858b60e43803477e898c7993e109a94701ce70.zip |
Chapter 28.5
Diffstat (limited to 'clox/src/compiler.c')
-rw-r--r-- | clox/src/compiler.c | 4 |
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); } |