mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: refactor argument handling for builtins
It is more convenient to have all unusual logic in one place.
This commit is contained in:
parent
d2326a8b96
commit
b6629fb6bd
2 changed files with 32 additions and 31 deletions
|
@ -187,16 +187,6 @@ func isBuiltin(expr ast.Expr) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func isAppCall(expr ast.Expr) bool {
|
||||
t, ok := expr.(*ast.SelectorExpr)
|
||||
return ok && t.Sel.Name == "AppCall"
|
||||
}
|
||||
|
||||
func isFromAddress(expr ast.Expr) bool {
|
||||
t, ok := expr.(*ast.SelectorExpr)
|
||||
return ok && t.Sel.Name == "FromAddress"
|
||||
}
|
||||
|
||||
func isByteArray(lit *ast.CompositeLit, tInfo *types.Info) bool {
|
||||
if len(lit.Elts) == 0 {
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue