From c74cb8eaf454d9243b75e3770001d8d128356b28 Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Sun, 23 Jul 2017 22:58:58 -0300 Subject: Format --- dice-lang/src/bjc/dicelang/Node.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'dice-lang/src/bjc/dicelang/Node.java') diff --git a/dice-lang/src/bjc/dicelang/Node.java b/dice-lang/src/bjc/dicelang/Node.java index af26870..af69c8c 100644 --- a/dice-lang/src/bjc/dicelang/Node.java +++ b/dice-lang/src/bjc/dicelang/Node.java @@ -13,10 +13,10 @@ public class Node { public final Type type; // These can have or not have values based of the node type - public Token tokenVal; - public Token.Type operatorType; - public GroupType groupType; - public EvaluatorResult resultVal; + public Token tokenVal; + public Token.Type operatorType; + public GroupType groupType; + public EvaluatorResult resultVal; public Node(final Type typ) { type = typ; @@ -52,13 +52,17 @@ public class Node { case UNARYOP: case BINOP: return "(" + type.name() + " : " + operatorType + ")"; + case OGROUP: case TOKREF: return "(" + type.name() + " : " + tokenVal + ")"; + case GROUP: return "(" + type.name() + " : " + groupType + ")"; + case RESULT: return "(" + type.name() + " : " + resultVal + ")"; + default: return "Unknown node type " + type; } @@ -75,6 +79,7 @@ public class Node { switch (type) { case OGROUP: return tokenVal.equals(otk.tokenVal); + default: return true; } -- cgit v1.2.3