Skip to content

Commit

Permalink
Finalized all unextensible classes on the header files.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Oct 14, 2024
1 parent 973e1d6 commit 8b21a07
Show file tree
Hide file tree
Showing 48 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion include/zhivo/ast/ASTNodeException.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <memory>
#include <stdexcept>

class ASTNodeException : public std::runtime_error {
class ASTNodeException final : public std::runtime_error {
private:
std::unique_ptr<Token> address;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/ArrayAccessExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <memory>
#include <vector>

class ArrayAccessExpression : public ASTNode {
class ArrayAccessExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> array;
std::unique_ptr<ASTNode> index;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/ArrayExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <memory>
#include <vector>

class ArrayExpression : public ASTNode {
class ArrayExpression final : public ASTNode {
private:
std::vector<std::unique_ptr<ASTNode>> elements;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/BinaryExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <cmath>

class BinaryExpression : public ASTNode {
class BinaryExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> left;
std::unique_ptr<ASTNode> right;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/BlockExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <memory>
#include <vector>

class BlockExpression : public ASTNode {
class BlockExpression final : public ASTNode {
private:
std::vector<std::unique_ptr<ASTNode>> statements;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/BooleanLiteralExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <zhivo/core/DynamicObject.hpp>
#include <zhivo/core/SymbolTable.hpp>

class BooleanLiteralExpression : public ASTNode {
class BooleanLiteralExpression final : public ASTNode {
private:
bool value;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/CatchHandleExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <memory>
#include <vector>

class CatchHandleExpression : public ASTNode {
class CatchHandleExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> catchBlock;
std::unique_ptr<ASTNode> handleBlock;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/FunctionCallExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <string>
#include <vector>

class FunctionCallExpression : public ASTNode {
class FunctionCallExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> callable;
std::vector<std::unique_ptr<ASTNode>> arguments;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <string>
#include <vector>

class FunctionDeclarationExpression : public ASTNode {
class FunctionDeclarationExpression final : public ASTNode {
private:
std::vector<std::unique_ptr<Token>> parameters;
std::unique_ptr<ASTNode> body;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/GroupedExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <zhivo/core/DynamicObject.hpp>
#include <zhivo/core/SymbolTable.hpp>

class GroupedExpression : public ASTNode {
class GroupedExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/IfElseExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <memory>

class IfElseExpression : public ASTNode {
class IfElseExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> condition;
std::unique_ptr<ASTNode> thenBranch;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/LoopExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <memory>
#include <vector>

class LoopExpression : public ASTNode {
class LoopExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> initial;
std::unique_ptr<ASTNode> condition;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/MaybeExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <zhivo/core/SymbolTable.hpp>
#include <zhivo/util/RandomBool.hpp>

class MaybeExpression : public ASTNode {
class MaybeExpression final : public ASTNode {
public:
explicit MaybeExpression(std::unique_ptr<Token> _address) {
this->address = std::move(_address);
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/NilCoalescingExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <zhivo/ast/ASTNode.hpp>
#include <zhivo/ast/TerminativeSignal.hpp>

class NilCoalescingExpression : public ASTNode {
class NilCoalescingExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> left;
std::unique_ptr<ASTNode> right;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/NilLiteralExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <zhivo/core/DynamicObject.hpp>
#include <zhivo/core/SymbolTable.hpp>

class NilLiteralExpression : public ASTNode {
class NilLiteralExpression final : public ASTNode {
public:
explicit NilLiteralExpression(std::unique_ptr<Token> _address) {
this->address = std::move(_address);
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/NumberLiteralExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <zhivo/core/DynamicObject.hpp>
#include <zhivo/core/SymbolTable.hpp>

class NumberLiteralExpression : public ASTNode {
class NumberLiteralExpression final : public ASTNode {
private:
double value;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/ParallelExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <memory>

class ParallelExpression : public ASTNode {
class ParallelExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/RandomExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <memory>

class RandomExpression : public ASTNode {
class RandomExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> thenBranch;
std::unique_ptr<ASTNode> elseBranch;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/RegexExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <zhivo/core/RegexWrapper.hpp>
#include <zhivo/core/SymbolTable.hpp>

class RegexExpression : public ASTNode {
class RegexExpression final : public ASTNode {
private:
std::string regExpression;
public:
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/RenderExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <zhivo/ast/ASTNode.hpp>

class RenderExpression : public ASTNode {
class RenderExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;
bool newLine;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/StringLiteralExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <string>

class StringLiteralExpression : public ASTNode {
class StringLiteralExpression final : public ASTNode {
private:
std::string value;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/TypeExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <string>

class TypeExpression : public ASTNode {
class TypeExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/UnaryExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <zhivo/core/DynamicObject.hpp>
#include <zhivo/core/SymbolTable.hpp>

class UnaryExpression : public ASTNode {
class UnaryExpression final : public ASTNode {
private:
std::string op;
std::unique_ptr<ASTNode> expression;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/UnlessExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <memory>

class UnlessExpression : public ASTNode {
class UnlessExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> condition;
std::unique_ptr<ASTNode> thenBranch;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/VariableAccessExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <string>

class VariableAccessExpression : public ASTNode {
class VariableAccessExpression final : public ASTNode {
private:
std::unique_ptr<Token> name;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/WhenExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <memory>
#include <vector>

class WhenExpression : public ASTNode {
class WhenExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;
std::vector<std::pair<std::unique_ptr<ASTNode>, std::unique_ptr<ASTNode>>> cases;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/expression/WhileExpression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <memory>
#include <vector>

class WhileExpression : public ASTNode {
class WhileExpression final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;
std::unique_ptr<ASTNode> body;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/statement/BreakStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <zhivo/core/SymbolTable.hpp>
#include <zhivo/parser/Token.hpp>

class BreakStatement : public ASTNode {
class BreakStatement final : public ASTNode {
public:
explicit BreakStatement(std::unique_ptr<Token> _address) {
this->address = std::move(_address);
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/statement/ContinueStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <zhivo/core/SymbolTable.hpp>
#include <zhivo/parser/Token.hpp>

class ContinueStatement : public ASTNode {
class ContinueStatement final : public ASTNode {
public:
explicit ContinueStatement(std::unique_ptr<Token> _address) {
this->address = std::move(_address);
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/statement/ExpressionStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <memory>

class ExpressionStatement : public ASTNode {
class ExpressionStatement final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/statement/ReturnStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <memory>

class ReturnStatement : public ASTNode {
class ReturnStatement final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/statement/TestStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <chrono>
#include <memory>

class TestStatement : public ASTNode {
class TestStatement final : public ASTNode {
private:
std::unique_ptr<ASTNode> testName;
std::unique_ptr<ASTNode> testBody;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/statement/ThrowStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <memory>

class ThrowStatement : public ASTNode {
class ThrowStatement final : public ASTNode {
private:
std::unique_ptr<ASTNode> expression;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <map>
#include <memory>

class VariableDeclarationStatement : public ASTNode {
class VariableDeclarationStatement final : public ASTNode {
private:
std::map<Token, std::unique_ptr<ASTNode>> declarations;
std::string nativePath;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/ast/statement/WaitStatement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <zhivo/core/SymbolTable.hpp>
#include <zhivo/parser/Token.hpp>

class WaitStatement : public ASTNode {
class WaitStatement final : public ASTNode {
public:
explicit WaitStatement(std::unique_ptr<Token> _address) {
this->address = std::move(_address);
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/core/DynamicObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ using NativeFunction = DynamicObject(
const std::vector<DynamicObject>&
);

class DynamicObject {
class DynamicObject final {
private:
DynamicObjectType type;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/core/RegexWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <regex>
#include <string>

class RegexWrapper {
class RegexWrapper final {
private:
std::string pattern;
std::unique_ptr<std::regex> regex;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/core/Runtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <unordered_map>

class Runtime {
class Runtime final {
private:
static bool testMode;
static std::unordered_map<std::string, void*> nativeLibraries;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/core/SymbolTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <unordered_map>
#include <vector>

class SymbolTable {
class SymbolTable final {
private:
SymbolTable* parent;
std::unordered_map<std::string, DynamicObject> table;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/parser/LexicalAnalysisException.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <stdexcept>
#include <string>

class LexicalAnalysisException : public std::runtime_error {
class LexicalAnalysisException final : public std::runtime_error {
public:
explicit LexicalAnalysisException(const std::string& message);
};
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/parser/OperatorsAndKeys.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <unordered_set>
#include <vector>

class OperatorsAndKeys {
class OperatorsAndKeys final {
public:
static const std::vector<std::string> operators;
static const std::unordered_set<std::string> keywords;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/parser/Parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <memory>
#include <vector>

class Parser {
class Parser final {
private:
std::vector<std::unique_ptr<ASTNode>> globalStatements;
std::vector<Token> tokens;
Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/parser/ParserException.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <memory>
#include <stdexcept>

class ParserException : public std::runtime_error {
class ParserException final : public std::runtime_error {
private:
std::unique_ptr<Token> address;

Expand Down
2 changes: 1 addition & 1 deletion include/zhivo/parser/Token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <zhivo/parser/TokenType.hpp>
#include <string>

class Token {
class Token final {
private:
std::string image;
std::string fileName;
Expand Down
Loading

0 comments on commit 8b21a07

Please sign in to comment.