@Test public void testCleanWithGlobalsGlsl100Misc() throws Exception { final String program = "" + "uniform float _FLOAT_CONST[1];" + "float foo(vec3 p, vec2 t) {" + " vec2 q = vec2(_FLOAT_CONST[0]);" + " return _FLOAT_CONST[0];" + "}" + "void main() { }"; final TranslationUnit tu = ParseHelper.parse(program); ConstCleaner.clean(tu); CompareAsts.assertEqualAsts(program, tu); }
public static void clean(TranslationUnit tu) { new ConstCleaner(tu); }
ConstCleaner extends ScopeTrackingVisitor { public static void clean(TranslationUnit tu) { new ConstCleaner(tu); } }
ConstCleaner extends ScopeTrackingVisitor { public static void clean(TranslationUnit tu) { new ConstCleaner(tu); } private  ConstCleaner(TranslationUnit tu); }
ConstCleaner extends ScopeTrackingVisitor { public static void clean(TranslationUnit tu) { new ConstCleaner(tu); } private  ConstCleaner(TranslationUnit tu); static void clean(TranslationUnit tu); @Override void visitFunctionDefinition(FunctionDefinition functionDefinition); @Override void visitVariableIdentifierExpr(VariableIdentifierExpr variableIdentifierExpr); @Override void visitVariablesDeclaration(VariablesDeclaration variablesDeclaration); }
ConstCleaner extends ScopeTrackingVisitor { public static void clean(TranslationUnit tu) { new ConstCleaner(tu); } private  ConstCleaner(TranslationUnit tu); static void clean(TranslationUnit tu); @Override void visitFunctionDefinition(FunctionDefinition functionDefinition); @Override void visitVariableIdentifierExpr(VariableIdentifierExpr variableIdentifierExpr); @Override void visitVariablesDeclaration(VariablesDeclaration variablesDeclaration);  }