tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SeparateDeclarations.h (1160B)


      1 //
      2 // Copyright 2002 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 // The SeparateDeclarations function processes declarations, so that in the end each declaration
      7 // contains only one declarator.
      8 // This is useful as an intermediate step when initialization needs to be separated from
      9 // declaration, or when things need to be unfolded out of the initializer.
     10 // Example:
     11 //     int a[1] = int[1](1), b[1] = int[1](2);
     12 // gets transformed when run through this class into the AST equivalent of:
     13 //     int a[1] = int[1](1);
     14 //     int b[1] = int[1](2);
     15 
     16 #ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
     17 #define COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
     18 
     19 #include "common/angleutils.h"
     20 
     21 namespace sh
     22 {
     23 class TCompiler;
     24 class TIntermNode;
     25 class TSymbolTable;
     26 
     27 [[nodiscard]] bool SeparateDeclarations(TCompiler *compiler,
     28                                        TIntermNode *root,
     29                                        TSymbolTable *symbolTable);
     30 }  // namespace sh
     31 
     32 #endif  // COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_