diff options
Diffstat (limited to 'BaseTools/Source/Python/Ecc/CodeFragmentCollector.py')
-rw-r--r-- | BaseTools/Source/Python/Ecc/CodeFragmentCollector.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py index c428752c05..d8d6aff08a 100644 --- a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py +++ b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py @@ -73,7 +73,7 @@ class CodeFragmentCollector: self.FileName = FileName
self.CurrentLineNumber = 1
self.CurrentOffsetWithinLine = 0
-
+ self.TokenReleaceList = []
self.__Token = ""
self.__SkippedChars = ""
@@ -503,6 +503,9 @@ class CodeFragmentCollector: FileStringContents = ''
for fileLine in self.Profile.FileLinesList:
FileStringContents += fileLine
+ for Token in self.TokenReleaceList:
+ if Token in FileStringContents:
+ FileStringContents = FileStringContents.replace(Token, 'TOKENSTRING')
cStream = antlr.InputStream(FileStringContents)
lexer = CLexer(cStream)
tStream = antlr.CommonTokenStream(lexer)
|