Added placeholders for type casts
This commit is contained in:
parent
f87cda97e2
commit
a905710982
19 changed files with 61 additions and 42 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue