Skip to content

Commit 6538a76

Browse files
committed
Swift: Add up and downgrade scripts.
1 parent fb470e4 commit 6538a76

File tree

11 files changed

+13249
-0
lines changed

11 files changed

+13249
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Change the second column in named_patterns from a @var_decl to a string
2+
class NamedPattern extends @named_pattern {
3+
VarDecl getVarDecl() { named_patterns(this, result) }
4+
5+
string toString() { none() }
6+
}
7+
8+
class VarDecl extends @var_decl {
9+
string getName() { var_decls(this, result, _) }
10+
11+
string toString() { none() }
12+
}
13+
14+
from NamedPattern np, VarDecl d, string name
15+
where d = np.getVarDecl() and name = d.getName()
16+
select np, name

0 commit comments

Comments
 (0)