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.
-
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
getLexer, getParser, getParseTokenFilter, parseExpression, parseExternalDeclaration, parseNode, parseNodeSeparate, parseSeparateExpression, parseSeparateExternalDeclaration, parseSeparateStatement, parseStatement, parseTranslationUnit, setLLOnly, 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
-