Added placeholders for type casts

This commit is contained in:
Eduard Urbach 2025-02-27 00:18:34 +01:00
parent f87cda97e2
commit a905710982
Signed by: eduard
GPG key ID: 49226B848C78F6C8
19 changed files with 61 additions and 42 deletions

View file

@ -14,8 +14,8 @@ import (
// PeriodToRegister moves a constant or a function address into the given register.
func (f *Function) PeriodToRegister(node *expression.Expression, register cpu.Register) (types.Type, error) {
left := node.Children[0]
leftText := left.Token.Text(f.File.Bytes)
right := node.Children[1]
leftText := left.Token.Text(f.File.Bytes)
rightText := right.Token.Text(f.File.Bytes)
variable := f.VariableByName(leftText)
@ -44,7 +44,7 @@ func (f *Function) PeriodToRegister(node *expression.Expression, register cpu.Re
f.SaveRegister(register)
f.RegisterNumber(asm.MOVE, register, number)
return types.Int, nil
return types.AnyInt, nil
}
uniqueName := fmt.Sprintf("%s.%s", leftText, rightText)