aboutsummaryrefslogtreecommitdiff
path: root/include/cps/Lexer.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-18 08:04:15 +0000
committer_ov4 <ov4@ov4.org>2026-10-18 08:04:15 +0000
commit927e3fc0384c941f9ad313a28768660c3cdb1777 (patch)
treeee82bef8d8332dad79d05db87f33979f0e7eb423 /include/cps/Lexer.h
parent34a4998658674411ef3b5a392483990467a5d6e2 (diff)
feat(driver): add #LIB directive hiding library lines in runtime errors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/Lexer.h')
-rw-r--r--include/cps/Lexer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/cps/Lexer.h b/include/cps/Lexer.h
index 1c4723e..588a5fa 100644
--- a/include/cps/Lexer.h
+++ b/include/cps/Lexer.h
@@ -120,6 +120,8 @@ class Lexer {
int CurrentLine = 1;
int TokenLine = 1;
bool HadError = false;
+ bool Library = false;
+ bool LineStart = true;
struct TokenData {
int Kind, Line;
std::string Identifier, String;
@@ -145,6 +147,7 @@ public:
int peekToken(unsigned Offset = 0);
int peekLine(unsigned Offset = 0);
int getLine() const { return TokenLine; }
+ bool isLibrary() const { return Library; }
bool hadError() const { return HadError; }
};