From cd7d50ec5a4effb37816595c881a1cd05223cc58 Mon Sep 17 00:00:00 2001 From: student Date: Wed, 18 Apr 2018 16:08:35 -0400 Subject: Resolve warnings --- .../java/bjc/pratt/examples/lang/ast/LangAST.java | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'JPratt/src/examples/java') diff --git a/JPratt/src/examples/java/bjc/pratt/examples/lang/ast/LangAST.java b/JPratt/src/examples/java/bjc/pratt/examples/lang/ast/LangAST.java index 7d35b61..3c6030e 100644 --- a/JPratt/src/examples/java/bjc/pratt/examples/lang/ast/LangAST.java +++ b/JPratt/src/examples/java/bjc/pratt/examples/lang/ast/LangAST.java @@ -12,16 +12,32 @@ import bjc.utils.data.TopDownTransformResult; * */ public abstract class LangAST { + /** + * The possible type of the AST nodes. + * + * @author student + * + */ public static enum ASTType { - LITERAL, OPERATOR + /** + * An AST literal + */ + LITERAL, + /** + * An AST operator + */ + OPERATOR } - + + /** + * The type of the node. + */ public final ASTType type; - + protected LangAST(ASTType typ) { type = typ; } - + /** * Evaluate the AST. * @@ -45,7 +61,7 @@ public abstract class LangAST { case "(literal)": return LiteralAST.fromToken(token.getValue()); default: - String msg = String.format("Unknown token type '%s'", key); + // String msg = String.format("Unknown token type '%s'", key); return new StringAST("RAW: " + token.toString()); } -- cgit v1.2.3