mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: refactor convertToken
func
Move `getEqualityOpcode` into `convertToken`. `convertToken` does not need codegen.
This commit is contained in:
parent
ae88c77a8a
commit
fd7af77895
3 changed files with 79 additions and 69 deletions
|
@ -31,6 +31,11 @@ func isByte(typ types.Type) bool {
|
|||
return isBasicTypeOfKind(typ, types.Uint8, types.Int8)
|
||||
}
|
||||
|
||||
func isNumber(typ types.Type) bool {
|
||||
t, ok := typ.Underlying().(*types.Basic)
|
||||
return ok && t.Info()&types.IsNumeric != 0
|
||||
}
|
||||
|
||||
func isString(typ types.Type) bool {
|
||||
return isBasicTypeOfKind(typ, types.String)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue