ExprToken.h revision f33f6de54db174aa679a4b6d1e040d37e95541c0
1//===- ExprToken.h --------------------------------------------------------===//
2//
3//                     The MCLinker Project
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9#ifndef MCLD_SCRIPT_EXPRTOKEN_H
10#define MCLD_SCRIPT_EXPRTOKEN_H
11#ifdef ENABLE_UNITTEST
12#include <gtest.h>
13#endif
14
15namespace mcld
16{
17
18/** \class ExprToken
19 *  \brief This class defines the interfaces to an expression token.
20 */
21
22class ExprToken
23{
24public:
25  enum Kind {
26    OPERATOR,
27    OPERAND
28  };
29
30protected:
31  ExprToken(Kind pKind)
32    : m_Kind(pKind)
33  {}
34
35public:
36  virtual ~ExprToken()
37  {}
38
39  virtual void dump() const = 0;
40
41  Kind kind() const { return m_Kind; }
42
43private:
44  Kind m_Kind;
45};
46
47} // namespace of mcld
48
49#endif
50
51