summaryrefslogtreecommitdiff
path: root/utils/TableGen/TGLexer.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-19 07:38:58 +0000
committerChris Lattner <sabre@nondot.org>2007-11-19 07:38:58 +0000
commitc8a9bbcbc777f5071ed67879b9f6f3b02c5d1e34 (patch)
tree381f9c4104a94ad1095d9a905dd1d8d1ff9aa82e /utils/TableGen/TGLexer.h
parent2b1f1066aca0f6a3687377636a86086fa2cd222d (diff)
downloadllvm-c8a9bbcbc777f5071ed67879b9f6f3b02c5d1e34.tar.gz
llvm-c8a9bbcbc777f5071ed67879b9f6f3b02c5d1e34.tar.bz2
llvm-c8a9bbcbc777f5071ed67879b9f6f3b02c5d1e34.tar.xz
Add carat diagnostics to tblgen lexer errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TGLexer.h')
-rw-r--r--utils/TableGen/TGLexer.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/utils/TableGen/TGLexer.h b/utils/TableGen/TGLexer.h
index 517b81a496..dab68c3aab 100644
--- a/utils/TableGen/TGLexer.h
+++ b/utils/TableGen/TGLexer.h
@@ -40,8 +40,6 @@ class TGLexer {
// IncludeDirectories - This is the list of directories we should search for
// include files in.
std::vector<std::string> IncludeDirectories;
-
- std::string TheError;
public:
TGLexer(MemoryBuffer *StartBuf);
~TGLexer();
@@ -52,11 +50,14 @@ public:
int LexToken();
- const std::string getError() const { return TheError; }
+ void PrintError(const char *Loc, const std::string &Msg) const;
+
+ std::ostream &err() const;
+ void PrintIncludeStack(std::ostream &OS) const;
- std::ostream &err();
- void PrintIncludeStack(std::ostream &OS);
private:
+ int ReturnError(const char *Loc, const std::string &Msg);
+
int getNextChar();
void SkipBCPLComment();
bool SkipCComment();