Swift: remove query predicates in upgrade/downgrade scripts

This commit is contained in:
Paolo Tranquilli
2023-02-09 17:22:55 +01:00
parent 968f588893
commit 7fa85b34ea
7 changed files with 4 additions and 33 deletions

View File

@@ -1,17 +0,0 @@
class IterableDeclContext extends @decl {
IterableDeclContext() {
this instanceof @extension_decl
or
this instanceof @nominal_type_decl
}
string toString() { none() }
}
class DeclOrNone extends @decl_or_none {
string toString() { none() }
}
query predicate iterable_decl_context_members(IterableDeclContext id, int index, DeclOrNone member) {
decl_members(id, index, member)
}

View File

@@ -1,5 +1,5 @@
description: revert removal of IterableDeclContext
compatibility: partial
iterable_decl_context_members.rel: run iterable_decl_context_members.qlo
iterable_decl_context_members.rel: reorder decl_members.rel (int id, int index, int member) id index member
decl_members.rel: delete

View File

@@ -1,5 +0,0 @@
class Callable extends @callable, @abstract_function_decl {
string toString() { result = "" }
}
query predicate abstract_function_decls(Callable id, string name) { callable_names(id, name) }

View File

@@ -2,5 +2,5 @@ description: Revert moving getName() from AbstractFunctionDecl to Callable
compatibility: backwards
// Rename callable_names to abstract_function_decls
abstract_function_decls.rel: run abstract_function_decls.qlo
abstract_function_decls.rel: reorder callable_names.rel (int id, string name) id name
callable_names.rel: delete

View File

@@ -1,7 +0,0 @@
class AbstractFunctionDecl extends @abstract_function_decl {
string toString() { result = "" }
}
query predicate callable_names(AbstractFunctionDecl id, string name) {
abstract_function_decls(id, name)
}

View File

@@ -2,5 +2,5 @@ description: Move getName() from AbstractFunctionDecl to Callable
compatibility: full
// Rename abstract_function_decls to callable_names
callable_names.rel: run callable_names.qlo
callable_names.rel: reorder abstract_function_decls.rel (int id, string name) id name
abstract_function_decls.rel: delete

View File

@@ -1,5 +1,5 @@
description: remove IterableDeclContext
compatibility: full
decl_members.rel: reorder iterable_decl_context_members.rel (int id, int index, int member) id index member
iterable_decl_context_members.rel: delete
decl_members.rel: run decl_members.qlo