mirror of
https://github.com/PashaBibko/LX.git
synced 2026-04-04 01:49:05 +00:00
Improved syntax for functions
Added logging system for AST nodes as well.
This commit is contained in:
@@ -81,6 +81,8 @@ namespace LX
|
||||
OPEN_BRACE, CLOSE_BRACE,
|
||||
OPEN_PAREN, CLOSE_PAREN,
|
||||
|
||||
COMMA,
|
||||
|
||||
// Operators //
|
||||
|
||||
ADD, SUB, MUL, DIV,
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace LX::AST
|
||||
{
|
||||
// General Nodes //
|
||||
|
||||
IDENTIFIER,
|
||||
NUMBER_LITERAL,
|
||||
OPERATION,
|
||||
|
||||
@@ -48,6 +47,9 @@ namespace LX::AST
|
||||
// Function for generating LLVN IR (Intermediate representation) //
|
||||
virtual llvm::Value* GenIR(InfoLLVM& LLVM) = 0;
|
||||
|
||||
// Function to log the node to a file //
|
||||
virtual void Log(std::ofstream* log, unsigned depth) = 0;
|
||||
|
||||
// Function for generating C/C++ code (Currently not implemented) //
|
||||
//virtual void GenC() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user