Removed dead code

This commit is contained in:
2025-03-04 13:35:55 +01:00
parent df6f7d5a57
commit e5f0123eea
14 changed files with 54 additions and 63 deletions

View File

@ -2,6 +2,7 @@ package core
import (
"encoding/binary"
"fmt"
"git.urbach.dev/cli/q/src/errors"
"git.urbach.dev/cli/q/src/eval"
@ -33,14 +34,17 @@ func (f *Function) EvaluateToken(t token.Token) (eval.Value, error) {
return value, nil
}
variable, function := f.Identifier(name)
variable := f.VariableByName(name)
if variable != nil {
f.UseVariable(variable)
return &variable.Value, nil
}
if function != nil {
uniqueName := fmt.Sprintf("%s.%s", f.Package, name)
function, exists := f.All.Functions[uniqueName]
if exists {
f.Dependencies = append(f.Dependencies, function)
value := &eval.Label{