compiler: refactor argument handling for builtins

It is more convenient to have all unusual logic in one place.
This commit is contained in:
Evgenii Stratonikov 2020-01-29 10:08:24 +03:00
parent d2326a8b96
commit b6629fb6bd
2 changed files with 32 additions and 31 deletions

View file

@ -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