Class SingleASTTransformer<T extends JobParameters>
java.lang.Object
io.github.douira.glsl_transformer.ast.transform.ASTParser
io.github.douira.glsl_transformer.ast.transform.ASTTransformer<T,String>
io.github.douira.glsl_transformer.ast.transform.SingleASTTransformer<T>
- All Implemented Interfaces:
ParserInterface,Transformer<String>,ParameterHolder<T>,ParameterizedTransformer<T,String>
The AST transformer takes parses a string, turns it into an AST, transforms
it with the given transformation and then prints it back.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.douira.glsl_transformer.ast.transform.ASTParser
ASTParser.CacheStrategy -
Constructor Summary
ConstructorsConstructorDescriptionSingleASTTransformer(TriConsumer<TranslationUnit, Root, T> transformation) SingleASTTransformer(BiConsumer<TranslationUnit, Root> transformation) SingleASTTransformer(Consumer<TranslationUnit> transformation) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetTransformation(TriConsumer<TranslationUnit, Root, T> transformation) voidsetTransformation(BiConsumer<TranslationUnit, Root> transformation) voidsetTransformation(Consumer<TranslationUnit> transformation) static <R> Consumer<TranslationUnit>wrapTransformation(ParameterizedTransformer<?, R> transformer, BiConsumer<TranslationUnit, Root> transformation) static <T,R> Consumer<TranslationUnit> wrapTransformation(ParameterizedTransformer<T, R> transformer, TriConsumer<TranslationUnit, Root, T> transformation) Methods inherited from class io.github.douira.glsl_transformer.ast.transform.ASTTransformer
getJobParameters, getPrintType, setJobParameters, setPrintTypeMethods inherited from class io.github.douira.glsl_transformer.ast.transform.ASTParser
getInternalInstance, getLexer, getParser, getParseTokenFilter, parseExpression, parseExpression, parseExternalDeclaration, parseExternalDeclarations, parseNode, parseNodeSeparate, parseSeparateExpression, parseSeparateExternalDeclaration, parseSeparateStatement, parseStatement, parseStatements, parseTranslationUnit, setBuildCacheSizeAndClear, setCacheStrategy, setLLOnly, setParseCacheSizeAndClear, setParseTokenFilter, setParsingStrategy, setSLLOnly, setThrowParseErrorsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.douira.glsl_transformer.job_parameter.ParameterHolder
withJobParametersMethods inherited from interface io.github.douira.glsl_transformer.job_parameter.ParameterizedTransformer
transform
-
Constructor Details
-
SingleASTTransformer
public SingleASTTransformer() -
SingleASTTransformer
-
SingleASTTransformer
-
SingleASTTransformer
-
-
Method Details
-
setTransformation
-
setTransformation
-
setTransformation
-
wrapTransformation
public static <T,R> Consumer<TranslationUnit> wrapTransformation(ParameterizedTransformer<T, R> transformer, TriConsumer<TranslationUnit, Root, T> transformation) -
wrapTransformation
public static <R> Consumer<TranslationUnit> wrapTransformation(ParameterizedTransformer<?, R> transformer, BiConsumer<TranslationUnit, Root> transformation) -
transform
- Throws:
RecognitionException
-