diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-06-08 16:46:48 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-06-13 09:01:32 +0800 |
commit | 46e4b3940e2f1862aa605900616a543a43f17222 (patch) | |
tree | d4e9e1fdff0a18949c551f1e6839643eb1870280 /BaseTools/Source/Python/Workspace | |
parent | 5a56c0493955cf55e7eef96dbba815cfbb067d7d (diff) | |
download | edk2-46e4b3940e2f1862aa605900616a543a43f17222.tar.gz edk2-46e4b3940e2f1862aa605900616a543a43f17222.tar.bz2 edk2-46e4b3940e2f1862aa605900616a543a43f17222.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index b1e715d5d4..a2ded0c845 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1581,7 +1581,11 @@ class DscParser(MetaFileParser): # update current status with sub-parser's status
self._SectionName = Parser._SectionName
- self._SectionType = Parser._SectionType
+ if not self._InSubsection:
+ self._SectionType = Parser._SectionType
+ self._SubsectionType = Parser._SubsectionType
+ self._InSubsection = Parser._InSubsection
+
self._Scope = Parser._Scope
self._Enabled = Parser._Enabled
|