aboutsummaryrefslogtreecommitdiffstats
path: root/Scanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Scanner.cpp')
-rw-r--r--Scanner.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Scanner.cpp b/Scanner.cpp
index 2f5f8d37..08bf744d 100644
--- a/Scanner.cpp
+++ b/Scanner.cpp
@@ -143,17 +143,22 @@ private:
}; // end of LiteralScope class
-void Scanner::reset(CharStream const& _source)
+void Scanner::reset(CharStream const& _source, string const& _sourceName)
{
m_source = _source;
+ m_sourceName = make_shared<string const>(_sourceName);
+ reset();
+}
+
+void Scanner::reset()
+{
+ m_source.reset();
m_char = m_source.get();
skipWhitespace();
scanToken();
-
next();
}
-
bool Scanner::scanHexByte(char& o_scannedByte)
{
char x = 0;