Path: blob/main_old/src/compiler/translator/Declarator.cpp
1693 views
//1// Copyright 2017 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// Declarator.cpp:6// Declarator type for parsing structure field declarators.78#include "compiler/translator/Declarator.h"910namespace sh11{1213TDeclarator::TDeclarator(const ImmutableString &name, const TSourceLoc &line)14: mName(name), mArraySizes(nullptr), mLine(line)15{16ASSERT(mName != "");17}1819TDeclarator::TDeclarator(const ImmutableString &name,20const TVector<unsigned int> *arraySizes,21const TSourceLoc &line)22: mName(name), mArraySizes(arraySizes), mLine(line)23{24ASSERT(mArraySizes);25}2627bool TDeclarator::isArray() const28{29return mArraySizes != nullptr && mArraySizes->size() > 0;30}3132} // namespace sh333435