BaseTools: Fix one bug of nest !include parser

The case is DSC file include file1, file1 include file2, after parse
file2 finished, DSC parser get the wrong section type, then it would
report invalid error.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Yunhua Feng 2018-06-08 16:46:48 +08:00 committed by Yonghong Zhu
parent 5a56c04939
commit 46e4b3940e
1 changed files with 5 additions and 1 deletions

View File

@ -1581,7 +1581,11 @@ class DscParser(MetaFileParser):
# update current status with sub-parser's status
self._SectionName = Parser._SectionName
if not self._InSubsection:
self._SectionType = Parser._SectionType
self._SubsectionType = Parser._SubsectionType
self._InSubsection = Parser._InSubsection
self._Scope = Parser._Scope
self._Enabled = Parser._Enabled