Skip to content

Commit

Permalink
Merge pull request #14567 from github/redsun82/swift-case-variables
Browse files Browse the repository at this point in the history
Swift: clean up `VarDecl`, `NamedPattern` and `SwitchStmt` interactions
  • Loading branch information
MathiasVP authored Oct 30, 2023
2 parents c4521a3 + 9e2f0b5 commit 3a9ffe1
Show file tree
Hide file tree
Showing 50 changed files with 13,850 additions and 396 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Change the second column in named_patterns from a @var_decl to a string
class NamedPattern extends @named_pattern {
VarDecl getVarDecl() { named_patterns(this, result) }

string toString() { none() }
}

class VarDecl extends @var_decl {
string getName() { var_decls(this, result, _) }

string toString() { none() }
}

from NamedPattern np, VarDecl d, string name
where d = np.getVarDecl() and name = d.getName()
select np, name
Loading

0 comments on commit 3a9ffe1

Please sign in to comment.