summaryrefslogtreecommitdiff
path: root/source/slang/lexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/lexer.h')
-rw-r--r--source/slang/lexer.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/source/slang/lexer.h b/source/slang/lexer.h
index 1f2954d27..46d2aa227 100644
--- a/source/slang/lexer.h
+++ b/source/slang/lexer.h
@@ -73,7 +73,7 @@ namespace Slang
struct Lexer
{
void initialize(
- SourceFile* sourceFile,
+ SourceUnit* sourceUnit,
DiagnosticSink* sink,
NamePool* namePool);
@@ -83,15 +83,7 @@ namespace Slang
TokenList lexAllTokens();
- // Begin overriding the reported locations of tokens,
- // based on a `#line` directives
- void startOverridingSourceLocations(SourceLoc loc);
-
- // Stop overriding source locations, and go back
- // to reporting source locations in the original file
- void stopOverridingSourceLocations();
-
- SourceFile* sourceFile;
+ SourceUnit* sourceUnit;
DiagnosticSink* sink;
NamePool* namePool;
@@ -100,13 +92,16 @@ namespace Slang
char const* begin;
char const* end;
+ /// The starting sourceLoc (same as first location of SourceUnit)
+ SourceLoc startLoc;
+
// The starting source location for the code as written,
// which cannot be overridden.
- SourceLoc spellingStartLoc;
+ //SourceLoc spellingStartLoc;
// The nominal starting location for the file, taking
// any active `#line` directive into account.
- SourceLoc presumedStartLoc;
+ //SourceLoc presumedStartLoc;
TokenFlags tokenFlags;
LexerFlags lexerFlags;