Files
swift-mirror/include/swift/Parse/Lexer.h
Chris Lattner db8e1301ff Start setting up the lexer object.
Swift SVN r7
2010-07-18 01:14:09 +00:00

45 lines
1.1 KiB
C++

//===--- Lexer.h - Swift Language Lexer -------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines the Lexer interface.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_LEXER_H
#define SWIFT_LEXER_H
#include "swift/Parse/Token.h"
namespace llvm {
class MemoryBuffer;
class SourceMgr;
}
namespace swift {
class Lexer {
llvm::SourceMgr &SourceMgr;
const llvm::MemoryBuffer *Buffer;
Lexer(const Lexer&); // DO NOT IMPLEMENT
void operator=(const Lexer&); // DO NOT IMPLEMENT
public:
Lexer(unsigned BufferID, llvm::SourceMgr &SM);
void Lex(Token &Result);
};
} // end namespace swift
#endif