Skip to content

Commit 4eacb55

Browse files
committed
Support if clauses
1 parent 8fe9b7e commit 4eacb55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/scala/scales/plugin.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ class ScalesComponent(val global: Global)
146146
treeCopy.Template(tree, t.parents, t.self, transformStatements(t.body))
147147

148148
case _: TypeTree => super.transform(tree)
149-
case _: Ident => super.transform(tree)
150149

151150
case d: DefDef if tree.symbol.isConstructor && (tree.symbol.isTrait || tree.symbol.isModule) => tree
152151

@@ -182,8 +181,11 @@ class ScalesComponent(val global: Global)
182181
updateLocation(d.symbol)
183182
super.transform(tree)
184183

184+
case _: Ident =>
185+
super.transform(tree)
186+
185187
case i: If =>
186-
treeCopy.If(i, i.cond, transformIf(i.thenp), transformIf(i.elsep))
188+
treeCopy.If(i, process(i.cond), transformIf(i.thenp), transformIf(i.elsep))
187189

188190
// handle function bodies. This AST node corresponds to the following Scala code: vparams => body
189191
case f: Function =>

0 commit comments

Comments
 (0)