blob: 00a8d3a3e1b2e392ae30c68b8e2a62651bdf5766 [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>
namespace pp
{
Lexer::Lexer() : mHandle(0)
{
}
Lexer::~Lexer()
{
destroyLexer();
// Make sure the lexer and associated buffer are deleted.
assert(mHandle == 0);
assert(mInput.buffer == 0);
}
bool Lexer::init(int count, const char* const string[], const int length[])
{
assert((count >= 0) && string);
mInput.count = count;
mInput.string = string;
mInput.length = length;
return initLexer();
}
} // namespace pp