Fixed incorrect register move
This commit is contained in:
@ -31,12 +31,14 @@ const (
|
||||
Shr // >>
|
||||
LogicalAnd // &&
|
||||
LogicalOr // ||
|
||||
_comparisons // <comparisons>
|
||||
Equal // ==
|
||||
NotEqual // !=
|
||||
Less // <
|
||||
Greater // >
|
||||
NotEqual // !=
|
||||
LessEqual // <=
|
||||
GreaterEqual // >=
|
||||
_comparisonsEnd // </comparisons>
|
||||
Define // :=
|
||||
Period // .
|
||||
Call // x()
|
||||
|
@ -28,6 +28,11 @@ func (t Token) IsAssignment() bool {
|
||||
return t.Kind > _assignments && t.Kind < _assignmentsEnd
|
||||
}
|
||||
|
||||
// IsComparison returns true if the token is a comparison operator.
|
||||
func (t Token) IsComparison() bool {
|
||||
return t.Kind > _comparisons && t.Kind < _comparisonsEnd
|
||||
}
|
||||
|
||||
// IsExpressionStart returns true if the token starts an expression.
|
||||
func (t Token) IsExpressionStart() bool {
|
||||
return t.Kind == GroupStart || t.Kind == ArrayStart || t.Kind == BlockStart
|
||||
|
Reference in New Issue
Block a user