Improved type system

This commit is contained in:
Eduard Urbach 2024-08-08 12:55:25 +02:00
parent 8eabcf258d
commit 69a5fdc703
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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)