Added more tests
This commit is contained in:
parent
28fc6d2af6
commit
6db1f1af69
7 changed files with 17 additions and 4 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"git.akyoto.dev/cli/q/src/build/asm"
|
||||
"git.akyoto.dev/cli/q/src/build/ast"
|
||||
"git.akyoto.dev/cli/q/src/build/cpu"
|
||||
"git.akyoto.dev/cli/q/src/build/errors"
|
||||
"git.akyoto.dev/cli/q/src/build/expression"
|
||||
)
|
||||
|
||||
|
@ -23,6 +24,10 @@ func (f *Function) ExpressionToRegister(node *expression.Expression, register cp
|
|||
return err
|
||||
}
|
||||
|
||||
if len(node.Children) < 2 {
|
||||
return errors.New(errors.MissingOperand, f.File, node.Token.End())
|
||||
}
|
||||
|
||||
left := node.Children[0]
|
||||
right := node.Children[1]
|
||||
final := register
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue