Hash :
98d04ec8
Author :
Date :
2012-05-21T22:47:20
Implemented #define and #undef directives. Review URL: https://codereview.appspot.com/6215072 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1092 736b8ea6-26fd-11df-bfd4-992fa37f6226
//
// 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.
//
#include "Preprocessor.h"
#include "Token.h"
namespace pp
{
Preprocessor::Preprocessor(Diagnostics* diagnostics) :
mDiagnostics(diagnostics),
mTokenizer(mDiagnostics),
mDirectiveParser(&mTokenizer, &mMacroSet, mDiagnostics),
mMacroExpander(&mDirectiveParser, &mMacroSet, mDiagnostics)
{
}
bool Preprocessor::init(int count,
const char* const string[],
const int length[])
{
return mTokenizer.init(count, string, length);
}
void Preprocessor::lex(Token* token)
{
mMacroExpander.lex(token);
}
} // namespace pp