Reviewed-by: Yonghong Zhu <[email protected]> Best Regards, Zhu Yonghong
-----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of Yonghong Zhu Sent: Tuesday, September 04, 2018 10:38 AM To: [email protected] Cc: Gao, Liming <[email protected]> Subject: [edk2] [Patch] BaseTools: Extend the keyword "!include"/"!if" to case-insensitive From: zhijufan <[email protected]> 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. Cc: Liming Gao <[email protected]> Cc: Yonghong Zhu <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <[email protected]> --- BaseTools/Source/Python/GenFds/FdfParser.py | 2 ++ 1 file changed, 2 insertions(+) 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 @@ -1111,10 +1111,12 @@ class FdfParser: EndPos = self.CurrentOffsetWithinLine 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: return False -- 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

