aboutsummaryrefslogtreecommitdiff
path: root/lib/Lexer/Lexer.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-27 14:00:16 +0000
committer_ov4 <ov4@ov4.org>2026-10-27 14:00:16 +0000
commit3d7d1d7cf8685f0d9230cd89d06017869da1c6d8 (patch)
tree3b5ea9523e94f4193eb1a28b237f41d81a2cde03 /lib/Lexer/Lexer.cc
parenta91bd145008432fb8c5d91d94ab6f50473a277f5 (diff)
feat(library)!: replace #LIB with __LIB source regions
Track library mode by original source line, including deferred template bodies and automatic object cleanup. Update call lines from ordinary code and migrate the embedded standard library to PP_DEFINE __LIB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/Lexer/Lexer.cc')
-rw-r--r--lib/Lexer/Lexer.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Lexer/Lexer.cc b/lib/Lexer/Lexer.cc
index 5bf2230..40bfce3 100644
--- a/lib/Lexer/Lexer.cc
+++ b/lib/Lexer/Lexer.cc
@@ -220,17 +220,10 @@ int Lexer::readToken() {
TokenLine = CurrentLine;
if (LastChar == '#' && LineStart) {
- std::string Directive;
do {
- Directive += static_cast<char>(LastChar);
LastChar = Input.get();
} while (LastChar != EOF && LastChar != '\n' && LastChar != '\r');
- while (!Directive.empty() && isspace(static_cast<unsigned char>(Directive.back())))
- Directive.pop_back();
- if (Directive == "#LIB") Library = true;
- else {
- reportError(TokenLine, "Unknown compiler directive");
- }
+ reportError(TokenLine, "Unknown compiler directive");
return readToken();
}
LineStart = false;