Skip to content
Snippets Groups Projects
Verified Commit c03d9cff authored by Emily Rowlands's avatar Emily Rowlands
Browse files

More work on AST

parent e44d2f02
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,6 @@ public class Lexer {
}
/**
*
* @return All tokens
* @throws IllegalCharacterException When an illegal character is
* encountered
......
......@@ -25,7 +25,7 @@ public class Parser {
}
}
private void err(TokenType expected, TokenType actual)
private static void err(TokenType expected, TokenType actual)
throws IllegalTokenException {
throw new IllegalTokenException(
"Expected: " + Lib.tokenTypeToString(expected) + " got: "
......@@ -33,7 +33,7 @@ public class Parser {
}
private void err(TokenType actual) throws IllegalTokenException {
private static void err(TokenType actual) throws IllegalTokenException {
throw new IllegalTokenException(
"Illegal Token: " + Lib.tokenTypeToString(actual));
}
......
package jrr1g18.boring.ast;
package jrr1g18.boring.nodes;
public abstract class ASTNode {
public enum NodeType {
......
package jrr1g18.boring.ast;
package jrr1g18.boring.nodes;
import jrr1g18.boring.tokens.Token.TokenType;
......
package jrr1g18.boring.ast;
package jrr1g18.boring.nodes;
public class ValueNode extends ASTNode {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment