Class NewlineFilter
java.lang.Object
io.github.douira.glsl_transformer.print.filter.NewlineFilter
- All Implemented Interfaces:
TokenFilter
The newline filter filters out regular unnecessary newlines if there is more
than one.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.douira.glsl_transformer.print.filter.TokenFilter
TokenFilter.TokenChannel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisTokenAllowed(Token token) Checks if the token should be printed.voidResets the filter's state.
-
Constructor Details
-
NewlineFilter
public NewlineFilter()
-
-
Method Details
-
resetState
public void resetState()Description copied from interface:TokenFilterResets the filter's state. Does nothing by default.- Specified by:
resetStatein interfaceTokenFilter
-
isTokenAllowed
Description copied from interface:TokenFilterChecks if the token should be printed.- Specified by:
isTokenAllowedin interfaceTokenFilter- Parameters:
token- The token to check- Returns:
trueif the given token should be printed
-