summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorzhijufan <zhijux.fan@intel.com>2018-09-04 10:28:11 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-09-05 09:04:13 +0800
commit865d7f7b0158f3fb4b3fb187aae4b323a705a8ed (patch)
treedae54b94e80950086a6ea8fd656a163f0b7f0f93 /BaseTools
parent04722cfa309104d815257a2705db5ee7024dc9bf (diff)
downloadedk2-865d7f7b0158f3fb4b3fb187aae4b323a705a8ed.zip
edk2-865d7f7b0158f3fb4b3fb187aae4b323a705a8ed.tar.gz
edk2-865d7f7b0158f3fb4b3fb187aae4b323a705a8ed.tar.bz2
BaseTools: Extend the keyword "!include"/"!if" to case-insensitive
Extend the keyword "!include", "!if", etc to case-insensitive. Current DSC parser already support it, while FDF parser only support the lower case, so this patch add the support for FDF parser. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=1111 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 8de0b48..7e1be65 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -1113,6 +1113,8 @@ class FdfParser:
if self.CurrentLineNumber != StartLine:
EndPos = len(self.Profile.FileLinesList[StartLine-1])
self.__Token = self.Profile.FileLinesList[StartLine-1][StartPos : EndPos]
+ if self.__Token.lower() in [TAB_IF, TAB_END_IF, TAB_ELSE_IF, TAB_ELSE, TAB_IF_DEF, TAB_IF_N_DEF, TAB_ERROR, TAB_INCLUDE]:
+ self.__Token = self.__Token.lower()
if StartPos != self.CurrentOffsetWithinLine:
return True
else: