Fixed incorrect division results
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"git.akyoto.dev/cli/q/src/ast"
|
||||
"git.akyoto.dev/cli/q/src/errors"
|
||||
"git.akyoto.dev/cli/q/src/expression"
|
||||
"git.akyoto.dev/cli/q/src/token"
|
||||
)
|
||||
|
||||
// CompileDefinition compiles a variable definition.
|
||||
@ -34,6 +35,10 @@ func (f *Function) CompileDefinition(node *ast.Define) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if left.Token.Kind == token.Separator && right.Token.Kind == token.Div {
|
||||
return f.CompileAssignDivision(node.Expression)
|
||||
}
|
||||
|
||||
if !ast.IsFunctionCall(right) {
|
||||
return errors.New(errors.NotImplemented, f.File, node.Expression.Token.Position)
|
||||
}
|
||||
|
Reference in New Issue
Block a user