Improved type system

This commit is contained in:
2024-08-08 12:55:25 +02:00
parent d624a5f895
commit 5d9be01a85
20 changed files with 111 additions and 67 deletions

View File

@ -8,7 +8,7 @@ import (
)
// Evaluate evaluates an expression and returns a register that contains the value of the expression.
func (f *Function) Evaluate(expr *expression.Expression) (types.Type, cpu.Register, error) {
func (f *Function) Evaluate(expr *expression.Expression) (*types.Type, cpu.Register, error) {
if expr.Token.Kind == token.Identifier {
name := expr.Token.Text(f.File.Bytes)
variable := f.VariableByName(name)