Skip to content

Commit fdcc3f9

Browse files
mvertesjaekwon
authored andcommitted
s/switchrealm/crossing/, s/witchswitch/cross/
1 parent b915914 commit fdcc3f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

gnovm/pkg/gnolang/gotypecheck.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func (g *gnoImporter) parseCheckMemPackage(mpkg *gnovm.MemPackage, fmt bool) (*t
141141
deleteOldIdents(delFunc, f)
142142
}
143143

144-
filterWithSwitchRealm(f)
144+
filterCrossing(f)
145145

146146
// enforce formatting
147147
if fmt {
@@ -183,19 +183,19 @@ func deleteOldIdents(idents map[string]func(), f *ast.File) {
183183
}
184184
}
185185

186-
func filterWithSwitchRealm(f *ast.File) {
186+
func filterCrossing(f *ast.File) {
187187
astutil.Apply(f, nil, func(c *astutil.Cursor) bool {
188188
switch n := c.Node().(type) {
189189
case *ast.ExprStmt:
190190
if ce, ok := n.X.(*ast.CallExpr); ok {
191-
if id, ok := ce.Fun.(*ast.Ident); ok && id.Name == "switchrealm" {
192-
// Delete statement 'switchrealm()'.
191+
if id, ok := ce.Fun.(*ast.Ident); ok && id.Name == "crossing" {
192+
// Delete statement 'crossing()'.
193193
c.Delete()
194194
}
195195
}
196196
case *ast.CallExpr:
197-
if id, ok := n.Fun.(*ast.Ident); ok && id.Name == "withswitch" {
198-
// Replace expression 'withswitch(x)' by 'x'.
197+
if id, ok := n.Fun.(*ast.Ident); ok && id.Name == "cross" {
198+
// Replace expression 'cross(x)' by 'x'.
199199
var a ast.Node
200200
if len(n.Args) > 0 {
201201
a = n.Args[0]

0 commit comments

Comments
 (0)