Class NewlineFilter<T extends JobParameters>
java.lang.Object
io.github.douira.glsl_transformer.transform.LifecycleUserImpl<T>
io.github.douira.glsl_transformer.print.filter.TokenFilter<T>
io.github.douira.glsl_transformer.print.filter.NewlineFilter<T>
- All Implemented Interfaces:
LifecycleUser<T>
The newline filter filters out regular unnecessary newlines if there is more
than one.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisTokenAllowed(Token token) Checks if the token should be printed.voidResets the filter's state.Methods inherited from class io.github.douira.glsl_transformer.print.filter.TokenFilter
joinMethods inherited from class io.github.douira.glsl_transformer.transform.LifecycleUserImpl
getPlanner, isInitialized, setInitialized, setPlannerMethods 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.transform.LifecycleUser
getJobParameters, getLexer, getParser, getRootNode, init, initOnce
-
Constructor Details
-
NewlineFilter
public NewlineFilter()
-
-
Method Details
-
resetState
public void resetState()Description copied from class:TokenFilterResets the filter's state. Does nothing by default.- Specified by:
resetStatein interfaceLifecycleUser<T extends JobParameters>- Overrides:
resetStatein classTokenFilter<T extends JobParameters>
-
isTokenAllowed
Description copied from class:TokenFilterChecks if the token should be printed.- Specified by:
isTokenAllowedin classTokenFilter<T extends JobParameters>- Parameters:
token- The token to check- Returns:
trueif the given token should be printed
-