16 lines
340 B
Python
16 lines
340 B
Python
from Core.LineConveyor.PreprocessorBase import PreprocessorBase
|
|
|
|
|
|
class CommentRemover(PreprocessorBase):
|
|
def __init__(self):
|
|
PreprocessorBase.__init__(self)
|
|
|
|
def processText(self, line, conveyorProcessor):
|
|
assert line is not None
|
|
|
|
newLine = line
|
|
index = line.find('#')
|
|
if index >= 0:
|
|
newLine = line[:index]
|
|
|
|
return newLine |