From ed4785d838f1ff754e418df5f0103295b9980827 Mon Sep 17 00:00:00 2001 From: Michael Bozhilov Date: Wed, 15 Nov 2023 18:41:12 +0200 Subject: [PATCH] Remove virtual node methods --- nulascript/ast/ast.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/nulascript/ast/ast.h b/nulascript/ast/ast.h index faafb76..9116eaf 100644 --- a/nulascript/ast/ast.h +++ b/nulascript/ast/ast.h @@ -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 ""; } }; @@ -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; @@ -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;