blob: ca00cdb3d7e0534aa4f31dbee87fdfc40d37be39 [file] [log] [blame]
//
// Copyright (c) 2012 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 "Lexer.h"
#include <cassert>
#include "Input.h"
namespace pp
{
Lexer::Lexer() : mHandle(0), mLeadingSpace(false)
{
}
Lexer::~Lexer()
{
destroyLexer();
}
bool Lexer::init(int count, const char* const string[], const int length[])
{
assert((count >= 0) && (string));
if ((count < 0) || (!string))
return false;
mInput.reset(new Input(count, string, length));
return initLexer();
}
} // namespace pp