From aa02e46d9f62c526fb2d91a75cbf5842084d73a4 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Wed, 17 Aug 2022 20:48:11 -0700 Subject: [PATCH] 11.3.4 --- ruby/lib/lox/resolver.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruby/lib/lox/resolver.rb b/ruby/lib/lox/resolver.rb index d2d48f4..ad60f21 100644 --- a/ruby/lib/lox/resolver.rb +++ b/ruby/lib/lox/resolver.rb @@ -38,6 +38,12 @@ module Lox nil end + def visit_assign(expr) + resolve(expr.value) + resolve_local(expr, expr.name) + nil + end + private def with_block