// Copyright (c) 2026 Charles KWON OhJun (charleskwonohjun@gmail.com) // All rights reserved. package gengo import "five/compiler/ast" // hasXBaseCommands checks if the file contains any xBase commands. func hasXBaseCommands(file *ast.File) bool { for _, d := range file.Decls { fn, ok := d.(*ast.FuncDecl) if !ok { continue } for _, s := range fn.Body { switch s.(type) { case *ast.UseCmd, *ast.GoCmd, *ast.SkipCmd, *ast.SeekCmd, *ast.ReplaceCmd, *ast.AppendCmd, *ast.DeleteCmd, *ast.SelectCmd, *ast.IndexCmd, *ast.SetCmd: return true } } } return false }