Olli Etuaho | fc0e2bc | 2015-04-16 13:39:56 +0300 | [diff] [blame^] | 1 | // |
| 2 | // Copyright (c) 2002-2015 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 SeparateArrayDeclarations function processes declarations that contain array declarators. Each declarator in |
| 7 | // such declarations gets its own declaration. |
| 8 | // This is useful as an intermediate step when initialization needs to be separated from declaration. |
| 9 | // Example: |
| 10 | // int a[1] = int[1](1), b[1] = int[1](2); |
| 11 | // gets transformed when run through this class into the AST equivalent of: |
| 12 | // int a[1] = int[1](1); |
| 13 | // int b[1] = int[1](2); |
| 14 | |
| 15 | #ifndef COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ |
| 16 | #define COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ |
| 17 | |
| 18 | class TIntermNode; |
| 19 | |
| 20 | void SeparateArrayDeclarations(TIntermNode *root); |
| 21 | |
| 22 | #endif // COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ |