Class NewlineFilter

java.lang.Object
io.github.douira.glsl_transformer.print.filter.NewlineFilter
All Implemented Interfaces:
TokenFilter

public class NewlineFilter extends Object implements TokenFilter
The newline filter filters out regular unnecessary newlines if there is more than one.
  • Constructor Details

    • NewlineFilter

      public NewlineFilter()
  • Method Details

    • resetState

      public void resetState()
      Description copied from interface: TokenFilter
      Resets the filter's state. Does nothing by default.
      Specified by:
      resetState in interface TokenFilter
    • isTokenAllowed

      public boolean isTokenAllowed(Token token)
      Description copied from interface: TokenFilter
      Checks if the token should be printed.
      Specified by:
      isTokenAllowed in interface TokenFilter
      Parameters:
      token - The token to check
      Returns:
      true if the given token should be printed