Home | History | Annotate | Download | only in Script
      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 /** \class ExprToken
     15  *  \brief This class defines the interfaces to an expression token.
     16  */
     17 
     18 class ExprToken {
     19  public:
     20   enum Kind { OPERATOR, OPERAND };
     21 
     22  protected:
     23   explicit ExprToken(Kind pKind) : m_Kind(pKind) {}
     24 
     25  public:
     26   virtual ~ExprToken() {}
     27 
     28   virtual void dump() const = 0;
     29 
     30   Kind kind() const { return m_Kind; }
     31 
     32  private:
     33   Kind m_Kind;
     34 };
     35 
     36 }  // namespace mcld
     37 
     38 #endif  // MCLD_SCRIPT_EXPRTOKEN_H_
     39