Index: dom/ASSwitchCase.java =================================================================== --- dom/ASSwitchCase.java (revision 635) +++ dom/ASSwitchCase.java (working copy) @@ -16,6 +16,11 @@ public interface ASSwitchCase extends SwitchLabel { /** + * Returns a the value expression for this label. + */ + public ASExpression getLabelValue(); + + /** * Returns a string representation of the value expression for this * label. e.g. given the label case 42:, this method * would return the string "42". Index: impl/ASTASSwitchCase.java =================================================================== --- impl/ASTASSwitchCase.java (revision 635) +++ impl/ASTASSwitchCase.java (working copy) @@ -6,6 +6,7 @@ package uk.co.badgersinfoil.metaas.impl; +import uk.co.badgersinfoil.metaas.dom.ASExpression; import uk.co.badgersinfoil.metaas.dom.ASSwitchCase; import uk.co.badgersinfoil.metaas.dom.StatementContainer; import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree; @@ -20,6 +21,10 @@ this.ast = ast; } + public ASExpression getLabelValue() { + return ExpressionBuilder.build(getChild(INDEX_LABELVAL)); + } + public String getLabelValueString() { return ASTUtils.stringifyNode(getChild(INDEX_LABELVAL)); }