aboutsummaryrefslogtreecommitdiff
path: root/include/cps/Parser.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 03:36:06 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 04:05:50 +0000
commit0b87ded993d59450ab70ade6e4ce154da65948a3 (patch)
tree0d3fae11e72efb52da9b4fa86b06fe5db3bbd120 /include/cps/Parser.h
parenteba981b4f515010f8f6e9602c563d2074d8bd915 (diff)
refactor(parser): remove dead token return, precedence check and includes
getNextToken() now returns void since no caller reads its result, and GetTokPrecedence() does a single map lookup without the unreachable non-positive precedence check. Unused <cstdio>, <set> and FunctionAST.h includes are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/Parser.h')
-rw-r--r--include/cps/Parser.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/cps/Parser.h b/include/cps/Parser.h
index f2c0868..39adfd1 100644
--- a/include/cps/Parser.h
+++ b/include/cps/Parser.h
@@ -12,7 +12,6 @@
#include <map>
#include <optional>
#include <string>
-#include <set>
namespace cps {
@@ -33,7 +32,7 @@ class Parser {
"C_INT", "C_CHAR", "C_STRING", "C_DOUBLE"
};
- int getNextToken();
+ void getNextToken();
int GetTokPrecedence();
std::unique_ptr<ExprAST> ParseExpression();