BaseTools:To generate string default type correctly in VfrCompiler

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18336 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Dandan Bi 2015-08-27 08:19:40 +00:00 committed by dandanbi
parent a909257835
commit 2bf63b20d2
2 changed files with 5 additions and 2 deletions

View File

@ -604,6 +604,7 @@ public:
static CIfrQuestionHeader *gCurrentQuestion = NULL;
static CIfrMinMaxStepData *gCurrentMinMaxData = NULL;
static BOOLEAN gIsOrderedList = FALSE;
static BOOLEAN gIsStringOp = FALSE;
/*
* The definition of all of the UEFI IFR Objects

View File

@ -1746,6 +1746,8 @@ vfrStatementDefault :
DObj->SetLineNo(D->getLine());
if (ArrayType) {
DObj->SetType (EFI_IFR_TYPE_BUFFER);
} else if (gIsStringOp) {
DObj->SetType (EFI_IFR_TYPE_STRING);
} else {
DObj->SetType (_GET_CURRQEST_DATATYPE());
}
@ -2819,7 +2821,7 @@ vfrStatementString :
UINT8 StringMinSize;
UINT8 StringMaxSize;
>>
L:String << SObj.SetLineNo(L->getLine()); >>
L:String << SObj.SetLineNo(L->getLine()); gIsStringOp = TRUE;>>
vfrQuestionHeader[SObj] ","
{ F:FLAGS "=" vfrStringFlagsField[SObj, F->getLine()] "," }
{
@ -2847,7 +2849,7 @@ vfrStatementString :
SObj.SetMaxSize (StringMaxSize);
>>
vfrStatementQuestionOptionList
E:EndString << CRT_END_OP (E); >>
E:EndString << CRT_END_OP (E); gIsStringOp = FALSE;>>
";"
;