Edit

kc3-lang/angle/src/compiler/preprocessor/new/Preprocessor.h

Branch :

  • Show log

    Commit

  • Author : alokp@chromium.org
    Date : 2011-08-30 05:10:53
    Hash : 3a01d1bc
    Message : Preparation for macro expansion. Review URL: http://codereview.appspot.com/4919045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@741 736b8ea6-26fd-11df-bfd4-992fa37f6226

  • src/compiler/preprocessor/new/Preprocessor.h
  • //
    // Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    #ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_
    #define COMPILER_PREPROCESSOR_PREPROCESSOR_H_
    
    #include "common/angleutils.h"
    #include "Token.h"
    
    namespace pp
    {
    
    class Context;
    
    class Preprocessor
    {
      public:
        Preprocessor();
        ~Preprocessor();
    
        bool init();
    
        bool process(int count, const char* const string[], const int length[]);
        TokenIterator begin() const { return mTokens.begin(); }
        TokenIterator end() const { return mTokens.end(); }
    
      private:
        DISALLOW_COPY_AND_ASSIGN(Preprocessor);
    
        // Reset to initialized state.
        void reset();
    
        Context* mContext;
        TokenVector mTokens;  // Output.
    };
    
    }  // namespace pp
    #endif  // COMPILER_PREPROCESSOR_PREPROCESSOR_H_