From e8bf7b70f7c72a43ec62d83276d9b92d291c15a9 Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Fri, 19 Dec 2025 17:01:57 +1100 Subject: [PATCH] Fix lexer --- src/main.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 75f441e..4e6f536 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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 == '=') {