From bc39c5cbea30b53c35a32150431bb7ea05a3238d Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Fri, 16 Nov 2018 23:40:04 +0800 Subject: BaseTools: create and use a standard shared variable for '*' add a variable for the string '*' and then use it instead of lots of '*' Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by : Bob Feng --- BaseTools/Source/Python/GenFds/FdfParser.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'BaseTools/Source/Python/GenFds/FdfParser.py') diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 2fbbad114c..e000228d2f 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -64,7 +64,6 @@ T_CHAR_CR = '\r' T_CHAR_TAB = '\t' T_CHAR_DOUBLE_QUOTE = '\"' T_CHAR_SINGLE_QUOTE = '\'' -T_CHAR_STAR = '*' T_CHAR_BRACE_R = '}' SEPARATORS = {TAB_EQUAL_SPLIT, TAB_VALUE_SPLIT, TAB_COMMA_SPLIT, '{', T_CHAR_BRACE_R} @@ -533,7 +532,7 @@ class FdfParser: InComment = False HashComment = False # check for */ comment end - elif InComment and not DoubleSlashComment and not HashComment and self._CurrentChar() == T_CHAR_STAR and self._NextChar() == TAB_BACK_SLASH: + elif InComment and not DoubleSlashComment and not HashComment and self._CurrentChar() == TAB_STAR and self._NextChar() == TAB_BACK_SLASH: self._SetCurrentCharValue(TAB_SPACE_SPLIT) self._GetOneChar() self._SetCurrentCharValue(TAB_SPACE_SPLIT) @@ -552,7 +551,7 @@ class FdfParser: InComment = True HashComment = True # check for /* comment start - elif self._CurrentChar() == TAB_BACK_SLASH and self._NextChar() == T_CHAR_STAR: + elif self._CurrentChar() == TAB_BACK_SLASH and self._NextChar() == TAB_STAR: self._SetCurrentCharValue(TAB_SPACE_SPLIT) self._GetOneChar() self._SetCurrentCharValue(TAB_SPACE_SPLIT) -- cgit v1.2.3