diff options
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/C/VfrCompile/VfrFormPkg.h | 1 | ||||
-rw-r--r-- | BaseTools/Source/C/VfrCompile/VfrSyntax.g | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h index 84300a7584..644dfddad9 100644 --- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h +++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h @@ -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
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g index fba8967fd2..ad839b2ab6 100644 --- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g +++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g @@ -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;>>
";"
;
|