#ifndef TGLEXER_H
#define TGLEXER_H
-#include "llvm/System/DataTypes.h"
-#include <vector>
+#include "llvm/Support/DataTypes.h"
#include <string>
+#include <vector>
#include <cassert>
namespace llvm {
l_brace, r_brace, // { }
l_paren, r_paren, // ( )
less, greater, // < >
- colon, semi, // ; :
+ colon, semi, // : ;
comma, period, // , .
equal, question, // = ?
// !keywords.
XConcat, XSRA, XSRL, XSHL, XStrConcat, XCast, XSubst,
- XForEach, XCar, XCdr, XNull, XIf, XEq,
+ XForEach, XHead, XTail, XEmpty, XIf, XEq,
// Integer value.
IntVal,
/// CurBuffer - This is the current buffer index we're lexing from as managed
/// by the SourceMgr object.
int CurBuffer;
+ /// Dependencies - This is the list of all included files.
+ std::vector<std::string> Dependencies;
public:
TGLexer(SourceMgr &SrcMgr);
tgtok::TokKind Lex() {
return CurCode = LexToken();
}
+
+ const std::vector<std::string> &getDependencies() const {
+ return Dependencies;
+ }
tgtok::TokKind getCode() const { return CurCode; }
}
SMLoc getLoc() const;
-
- void PrintError(const char *Loc, const Twine &Msg) const;
- void PrintError(SMLoc Loc, const Twine &Msg) const;
private:
/// LexToken - Read the next token and return its code.