Fix lexer

This commit is contained in:
2025-12-19 17:01:57 +11:00
parent b5c8b1b7ec
commit e8bf7b70f7

View File

@@ -165,9 +165,6 @@ namespace HighGround {
break;
}
case HGNodeType::Equal: {
std::cout << "Equal node children: " << children.size() << "\n";
std::cout << "Left outputId: '" << children[0].outputId << "'\n";
std::cout << "Right outputId: '" << children[1].outputId << "'\n";
HGGroundCodeBlock codeBlock;
outputId = "tmp_" + std::to_string(tmpIdIterator++);
GroundInstruction gi = groundCreateInstruction(EQUAL);
@@ -480,7 +477,6 @@ namespace HighGround {
}
codeBlockNode.children = Parser(tokens).parse().children;
rootNode.addNode(codeBlockNode);
// WIP
break;
}
}
@@ -551,7 +547,7 @@ namespace HighGround {
case '-':
{
std::string newToken(1, c);
auto tokenopt = peek();
auto tokenopt = peek(0);
if (tokenopt) {
char token = tokenopt.value();
if (token == c || token == '=') {
@@ -572,7 +568,7 @@ namespace HighGround {
case '=':
{
std::string newToken(1, c);
auto tokenopt = peek();
auto tokenopt = peek(0);
if (tokenopt) {
char token = tokenopt.value();
if (token == '=') {