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 
12 namespace mcld
13 {
14 
15 /** \class ExprToken
16  *  \brief This class defines the interfaces to an expression token.
17  */
18 
19 class ExprToken
20 {
21 public:
22   enum Kind {
23     OPERATOR,
24     OPERAND
25   };
26 
27 protected:
ExprToken(Kind pKind)28   ExprToken(Kind pKind)
29     : m_Kind(pKind)
30   {}
31 
32 public:
~ExprToken()33   virtual ~ExprToken()
34   {}
35 
36   virtual void dump() const = 0;
37 
kind()38   Kind kind() const { return m_Kind; }
39 
40 private:
41   Kind m_Kind;
42 };
43 
44 } // namespace of mcld
45 
46 #endif
47 
48