forked from solstice/solstice
Compilation with ground->asm
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "error.h"
|
||||
#include "lexer.h"
|
||||
#include "solstice_stdlib.h"
|
||||
#include "argparser.h"
|
||||
#include <groundvm.h>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
@@ -209,9 +210,11 @@ namespace Solstice {
|
||||
std::vector<SolGroundCodeBlock> code;
|
||||
if (nodeType == SolNodeType::Root) {
|
||||
// Compile and insert standard library
|
||||
auto parsedStdlib = Parser(Lexer(getStdLib()).lex()).parse();
|
||||
parsedStdlib.nodeType = SolNodeType::None;
|
||||
code = parsedStdlib.generateCode();
|
||||
if (!ArgParser::nostdlib) {
|
||||
auto parsedStdlib = Parser(Lexer(getStdLib()).lex()).parse();
|
||||
parsedStdlib.nodeType = SolNodeType::None;
|
||||
code = parsedStdlib.generateCode();
|
||||
}
|
||||
}
|
||||
if (nodeType != SolNodeType::If && nodeType != SolNodeType::While) for (auto& child : children) {
|
||||
auto childCode = child.generateCode();
|
||||
|
||||
Reference in New Issue
Block a user