lang: Make scope error messages be more consistent

This commit is contained in:
James Shubin
2025-03-12 00:23:20 -04:00
parent 87d8533bd0
commit a6057319a9
6 changed files with 9 additions and 7 deletions

View File

@@ -9768,7 +9768,7 @@ func (obj *ExprCall) SetScope(scope *interfaces.Scope, sctx map[string]interface
if obj.data.Debug || true { // TODO: leave this on permanently?
lambdaScopeFeedback(obj.scope, obj.data.Logf)
}
return fmt.Errorf("func `%s` does not exist in this scope", prefixedName)
return fmt.Errorf("lambda `$%s` does not exist in this scope", prefixedName)
}
target = f
}
@@ -10462,7 +10462,7 @@ func (obj *ExprVar) SetScope(scope *interfaces.Scope, sctx map[string]interfaces
if obj.data.Debug || true { // TODO: leave this on permanently?
variableScopeFeedback(obj.scope, obj.data.Logf)
}
return fmt.Errorf("variable %s not in scope", obj.Name)
return fmt.Errorf("var `$%s` does not exist in this scope", obj.Name)
}
obj.scope.Variables[obj.Name] = target