Class TrimWhitespaceOnly
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.model.base.preprocessing.TrimWhitespaceOnly
-
- All Implemented Interfaces:
IGeneralPreProcessor
,IPreProcessor
public class TrimWhitespaceOnly extends java.lang.Object implements IGeneralPreProcessor
-
-
Constructor Summary
Constructors Constructor Description TrimWhitespaceOnly()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ILexerSpecification
getLexerSpecification()
Specifies which channels must be present in the lexer for the preprocessor to function, this is a minimum specification, other channels may be present.java.util.List<? extends org.antlr.v4.runtime.Token>
process(java.util.List<? extends org.antlr.v4.runtime.Token> tokens, org.antlr.v4.runtime.Vocabulary vocab, java.lang.String lang)
Removes the excess whitespace from a sourcefile-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.ac.warwick.dcs.sherlock.api.model.preprocessing.IGeneralPreProcessor
getDependencies
-
-
-
-
Method Detail
-
getLexerSpecification
public ILexerSpecification getLexerSpecification()
Description copied from interface:IGeneralPreProcessor
Specifies which channels must be present in the lexer for the preprocessor to function, this is a minimum specification, other channels may be present.- Specified by:
getLexerSpecification
in interfaceIGeneralPreProcessor
- Returns:
- lexer specification
-
process
public java.util.List<? extends org.antlr.v4.runtime.Token> process(java.util.List<? extends org.antlr.v4.runtime.Token> tokens, org.antlr.v4.runtime.Vocabulary vocab, java.lang.String lang)
Removes the excess whitespace from a sourcefile- Specified by:
process
in interfaceIGeneralPreProcessor
- Parameters:
tokens
- List of tokens to processvocab
- Lexer vocabularylang
- language of source file being processed- Returns:
- stream of tokens containing comments
-
-