Skip to content

Commit

Permalink
Remove virtual node methods
Browse files Browse the repository at this point in the history
  • Loading branch information
asynchroza committed Nov 15, 2023
1 parent 4b905f4 commit ed4785d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions nulascript/ast/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ class Node {
virtual std::string toString() = 0;
};

class Statement : public Node {
public:
void statementNode();
};
class Statement : public Node {};

class Expression : public Node {
public:
void expressionNode();

// ! temp placeholders
std::string tokenLiteral() override { return ""; }
std::string toString() override { return ""; }
};
Expand All @@ -33,7 +27,6 @@ class Program : public Node {
std::string toString() override;
};

// ? should expressionNode be virtual and overriden in child expressions?
class Identifier : public Expression {
public:
Token token;
Expand Down Expand Up @@ -119,7 +112,6 @@ class Boolean : public Expression {
std::string toString() override;
};

// ? should statementNode be virtual and overriden in child statements?
class LetStatement : public Statement {
public:
Token token;
Expand Down

0 comments on commit ed4785d

Please sign in to comment.