private static bool IsApplication(CompileUnit unit) { foreach (Module m in unit.Modules) { if (m.Globals.HasStatements) return true; } return false; }