Switched to pointer receivers for values

This commit is contained in:
2025-03-01 18:38:00 +01:00
parent 8ff6faa310
commit 4428b09de2
17 changed files with 62 additions and 62 deletions

View File

@ -29,7 +29,7 @@ func (f *Function) EvaluateDot(expr *expression.Expression) (eval.Value, error)
return nil, errors.New(&errors.UnknownStructField{StructName: structure.Name(), FieldName: rightText}, f.File, right.Token.Position)
}
value := eval.Memory{
value := &eval.Memory{
Typ: field.Type,
Memory: asm.Memory{
Base: variable.Value.Register,
@ -51,7 +51,7 @@ func (f *Function) EvaluateDot(expr *expression.Expression) (eval.Value, error)
return nil, err
}
value := eval.Number{
value := &eval.Number{
Typ: types.AnyInt,
Number: number,
}
@ -65,7 +65,7 @@ func (f *Function) EvaluateDot(expr *expression.Expression) (eval.Value, error)
if exists {
f.File.Imports[leftText].Used = true
value := eval.Label{
value := &eval.Label{
Typ: types.AnyPointer,
Label: function.UniqueName,
}