diff options
author | Jaben Carsey <jaben.carsey@intel.com> | 2018-11-16 23:40:04 +0800 |
---|---|---|
committer | BobCF <bob.c.feng@intel.com> | 2018-12-06 17:11:24 +0800 |
commit | bc39c5cbea30b53c35a32150431bb7ea05a3238d (patch) | |
tree | 78fd7f91b47f437c4f7b78be4ebaa35c50f116d5 /BaseTools/Source/Python/GenFds/FdfParser.py | |
parent | ea55e37c369ac5b9dc1a6fcc647bd3fa20cb05b1 (diff) | |
download | edk2-bc39c5cbea30b53c35a32150431bb7ea05a3238d.tar.gz edk2-bc39c5cbea30b53c35a32150431bb7ea05a3238d.tar.bz2 edk2-bc39c5cbea30b53c35a32150431bb7ea05a3238d.zip |
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 <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by : Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FdfParser.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FdfParser.py | 5 |
1 files changed, 2 insertions, 3 deletions
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)
|