lib/loxxy/back_end/resolver.rb in loxxy-0.4.06 vs lib/loxxy/back_end/resolver.rb in loxxy-0.4.07
- old
+ new
@@ -218,10 +218,10 @@
return if scopes.empty?
curr_scope = scopes.last
# Oddly enough, Lox allows variable re-declaration at top-level
if curr_scope.include?(aVarName)
- msg = "Error at '#{aVarName}': Already variable with this name in this scope."
+ msg = "Error at '#{aVarName}': Already a variable with this name in this scope."
raise Loxxy::RuntimeError, msg
elsif curr_scope.size == 255 && current_function != :none
msg = "Error at '#{aVarName}': Too many local variables in function."
raise Loxxy::RuntimeError, msg
end