Commit e7847b08 by Olli Etuaho

Unify declaration parsing code

Remove the unused identifierSymbol parameter from parseSingleDeclarator and unify the ordering of parameters and the code style of different declaration and declarator parsing functions. Some minor functional changes to array size handling are done mainly to unify error message generation. There's soon going to be more of these functions, so it's good to be systematic. TEST=angle_unittests, WebGL conformance tests BUG=angleproject:941 Change-Id: I03b0220de93ca5719fdb7c1790a5999b8cb5b225 Reviewed-on: https://chromium-review.googlesource.com/265202Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
parent 33e98913
...@@ -673,9 +673,10 @@ bool TParseContext::arraySizeErrorCheck(const TSourceLoc& line, TIntermTyped* ex ...@@ -673,9 +673,10 @@ bool TParseContext::arraySizeErrorCheck(const TSourceLoc& line, TIntermTyped* ex
{ {
TIntermConstantUnion* constant = expr->getAsConstantUnion(); TIntermConstantUnion* constant = expr->getAsConstantUnion();
if (constant == 0 || !constant->isScalarInt()) if (constant == nullptr || !constant->isScalarInt())
{ {
error(line, "array size must be a constant integer expression", ""); error(line, "array size must be a constant integer expression", "");
size = 1;
return true; return true;
} }
...@@ -1076,8 +1077,9 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& line, TFunction* ...@@ -1076,8 +1077,9 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& line, TFunction*
// Returns true on error, false if no error // Returns true on error, false if no error
// //
bool TParseContext::executeInitializer(const TSourceLoc &line, const TString &identifier, TPublicType &pType, bool TParseContext::executeInitializer(const TSourceLoc &line, const TString &identifier, TPublicType &pType,
TIntermTyped *initializer, TIntermNode *&intermNode) TIntermTyped *initializer, TIntermNode **intermNode)
{ {
ASSERT(intermNode != nullptr);
TType type = TType(pType); TType type = TType(pType);
TVariable *variable = nullptr; TVariable *variable = nullptr;
...@@ -1131,15 +1133,21 @@ bool TParseContext::executeInitializer(const TSourceLoc &line, const TString &id ...@@ -1131,15 +1133,21 @@ bool TParseContext::executeInitializer(const TSourceLoc &line, const TString &id
} }
} }
if (qualifier != EvqConst) { if (qualifier != EvqConst)
TIntermSymbol* intermSymbol = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), line); {
intermNode = createAssign(EOpInitialize, intermSymbol, initializer, line); TIntermSymbol *intermSymbol = intermediate.addSymbol(variable->getUniqueId(), variable->getName(),
if (intermNode == 0) { variable->getType(), line);
*intermNode = createAssign(EOpInitialize, intermSymbol, initializer, line);
if (*intermNode == nullptr)
{
assignError(line, "=", intermSymbol->getCompleteString(), initializer->getCompleteString()); assignError(line, "=", intermSymbol->getCompleteString(), initializer->getCompleteString());
return true; return true;
} }
} else }
intermNode = 0; else
{
*intermNode = nullptr;
}
return false; return false;
} }
...@@ -1236,7 +1244,6 @@ TIntermAggregate *TParseContext::parseSingleDeclaration(TPublicType &publicType, ...@@ -1236,7 +1244,6 @@ TIntermAggregate *TParseContext::parseSingleDeclaration(TPublicType &publicType,
const TString &identifier) const TString &identifier)
{ {
TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, TType(publicType), identifierOrTypeLocation); TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, TType(publicType), identifierOrTypeLocation);
TIntermAggregate *aggregate = intermediate.makeAggregate(symbol, identifierOrTypeLocation);
mDeferredSingleDeclarationErrorCheck = (identifier == ""); mDeferredSingleDeclarationErrorCheck = (identifier == "");
...@@ -1253,15 +1260,17 @@ TIntermAggregate *TParseContext::parseSingleDeclaration(TPublicType &publicType, ...@@ -1253,15 +1260,17 @@ TIntermAggregate *TParseContext::parseSingleDeclaration(TPublicType &publicType,
recover(); recover();
if (variable && symbol) if (variable && symbol)
{
symbol->setId(variable->getUniqueId()); symbol->setId(variable->getUniqueId());
} }
}
return aggregate; return intermediate.makeAggregate(symbol, identifierOrTypeLocation);
} }
TIntermAggregate* TParseContext::parseSingleArrayDeclaration(TPublicType &publicType, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& indexLocation, TIntermTyped *indexExpression) TIntermAggregate *TParseContext::parseSingleArrayDeclaration(TPublicType &publicType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &indexLocation,
TIntermTyped *indexExpression)
{ {
mDeferredSingleDeclarationErrorCheck = false; mDeferredSingleDeclarationErrorCheck = false;
...@@ -1283,49 +1292,48 @@ TIntermAggregate* TParseContext::parseSingleArrayDeclaration(TPublicType &public ...@@ -1283,49 +1292,48 @@ TIntermAggregate* TParseContext::parseSingleArrayDeclaration(TPublicType &public
{ {
recover(); recover();
} }
else // Make the type an array even if size check failed.
{ // This ensures useless error messages regarding the variable's non-arrayness won't follow.
arrayType.setArraySize(size); arrayType.setArraySize(size);
}
TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, arrayType, identifierLocation);
TIntermAggregate* aggregate = intermediate.makeAggregate(symbol, identifierLocation);
TVariable *variable = nullptr; TVariable *variable = nullptr;
if (!declareVariable(identifierLocation, identifier, arrayType, &variable)) if (!declareVariable(identifierLocation, identifier, arrayType, &variable))
recover(); recover();
TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, arrayType, identifierLocation);
if (variable && symbol) if (variable && symbol)
{
symbol->setId(variable->getUniqueId()); symbol->setId(variable->getUniqueId());
}
return aggregate; return intermediate.makeAggregate(symbol, identifierLocation);
} }
TIntermAggregate* TParseContext::parseSingleInitDeclaration(TPublicType &publicType, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& initLocation, TIntermTyped *initializer) TIntermAggregate *TParseContext::parseSingleInitDeclaration(TPublicType &publicType,
const TSourceLoc &identifierLocation,
const TString &identifier,
const TSourceLoc &initLocation,
TIntermTyped *initializer)
{ {
mDeferredSingleDeclarationErrorCheck = false; mDeferredSingleDeclarationErrorCheck = false;
if (singleDeclarationErrorCheck(publicType, identifierLocation)) if (singleDeclarationErrorCheck(publicType, identifierLocation))
recover(); recover();
TIntermNode* intermNode; TIntermNode *intermNode = nullptr;
if (!executeInitializer(identifierLocation, identifier, publicType, initializer, intermNode)) if (!executeInitializer(identifierLocation, identifier, publicType, initializer, &intermNode))
{ {
// //
// Build intermediate representation // Build intermediate representation
// //
return intermNode ? intermediate.makeAggregate(intermNode, initLocation) : NULL; return intermNode ? intermediate.makeAggregate(intermNode, initLocation) : nullptr;
} }
else else
{ {
recover(); recover();
return NULL; return nullptr;
} }
} }
TIntermAggregate* TParseContext::parseInvariantDeclaration(const TSourceLoc &invariantLoc, TIntermAggregate *TParseContext::parseInvariantDeclaration(const TSourceLoc &invariantLoc,
const TSourceLoc &identifierLoc, const TSourceLoc &identifierLoc,
const TString *identifier, const TString *identifier,
const TSymbol *symbol) const TSymbol *symbol)
...@@ -1340,7 +1348,7 @@ TIntermAggregate* TParseContext::parseInvariantDeclaration(const TSourceLoc &inv ...@@ -1340,7 +1348,7 @@ TIntermAggregate* TParseContext::parseInvariantDeclaration(const TSourceLoc &inv
{ {
error(identifierLoc, "undeclared identifier declared as invariant", identifier->c_str()); error(identifierLoc, "undeclared identifier declared as invariant", identifier->c_str());
recover(); recover();
return NULL; return nullptr;
} }
else else
{ {
...@@ -1349,7 +1357,7 @@ TIntermAggregate* TParseContext::parseInvariantDeclaration(const TSourceLoc &inv ...@@ -1349,7 +1357,7 @@ TIntermAggregate* TParseContext::parseInvariantDeclaration(const TSourceLoc &inv
{ {
error(identifierLoc, "identifier should not be declared as invariant", identifier->c_str()); error(identifierLoc, "identifier should not be declared as invariant", identifier->c_str());
recover(); recover();
return NULL; return nullptr;
} }
symbolTable.addInvariantVarying(std::string(identifier->c_str())); symbolTable.addInvariantVarying(std::string(identifier->c_str()));
const TVariable *variable = getNamedVariable(identifierLoc, identifier, symbol); const TVariable *variable = getNamedVariable(identifierLoc, identifier, symbol);
...@@ -1364,7 +1372,8 @@ TIntermAggregate* TParseContext::parseInvariantDeclaration(const TSourceLoc &inv ...@@ -1364,7 +1372,8 @@ TIntermAggregate* TParseContext::parseInvariantDeclaration(const TSourceLoc &inv
} }
} }
TIntermAggregate* TParseContext::parseDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration, TSymbol *identifierSymbol, const TSourceLoc& identifierLocation, const TString &identifier) TIntermAggregate *TParseContext::parseDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration,
const TSourceLoc &identifierLocation, const TString &identifier)
{ {
// If the declaration starting this declarator list was empty (example: int,), some checks were not performed. // If the declaration starting this declarator list was empty (example: int,), some checks were not performed.
if (mDeferredSingleDeclarationErrorCheck) if (mDeferredSingleDeclarationErrorCheck)
...@@ -1374,9 +1383,6 @@ TIntermAggregate* TParseContext::parseDeclarator(TPublicType &publicType, TInter ...@@ -1374,9 +1383,6 @@ TIntermAggregate* TParseContext::parseDeclarator(TPublicType &publicType, TInter
mDeferredSingleDeclarationErrorCheck = false; mDeferredSingleDeclarationErrorCheck = false;
} }
TIntermSymbol* symbol = intermediate.addSymbol(0, identifier, TType(publicType), identifierLocation);
TIntermAggregate* intermAggregate = intermediate.growAggregate(aggregateDeclaration, symbol, identifierLocation);
if (locationDeclaratorListCheck(identifierLocation, publicType)) if (locationDeclaratorListCheck(identifierLocation, publicType))
recover(); recover();
...@@ -1386,13 +1392,17 @@ TIntermAggregate* TParseContext::parseDeclarator(TPublicType &publicType, TInter ...@@ -1386,13 +1392,17 @@ TIntermAggregate* TParseContext::parseDeclarator(TPublicType &publicType, TInter
TVariable *variable = nullptr; TVariable *variable = nullptr;
if (!declareVariable(identifierLocation, identifier, TType(publicType), &variable)) if (!declareVariable(identifierLocation, identifier, TType(publicType), &variable))
recover(); recover();
if (symbol && variable)
TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, TType(publicType), identifierLocation);
if (variable && symbol)
symbol->setId(variable->getUniqueId()); symbol->setId(variable->getUniqueId());
return intermAggregate; return intermediate.growAggregate(aggregateDeclaration, symbol, identifierLocation);
} }
TIntermAggregate* TParseContext::parseArrayDeclarator(TPublicType &publicType, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& arrayLocation, TIntermNode *declaratorList, TIntermTyped *indexExpression) TIntermAggregate *TParseContext::parseArrayDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration,
const TSourceLoc &identifierLocation, const TString &identifier,
const TSourceLoc &arrayLocation, TIntermTyped *indexExpression)
{ {
// If the declaration starting this declarator list was empty (example: int,), some checks were not performed. // If the declaration starting this declarator list was empty (example: int,), some checks were not performed.
if (mDeferredSingleDeclarationErrorCheck) if (mDeferredSingleDeclarationErrorCheck)
...@@ -1414,27 +1424,31 @@ TIntermAggregate* TParseContext::parseArrayDeclarator(TPublicType &publicType, c ...@@ -1414,27 +1424,31 @@ TIntermAggregate* TParseContext::parseArrayDeclarator(TPublicType &publicType, c
} }
else else
{ {
TType arrayType = TType(publicType);
int size; int size;
if (arraySizeErrorCheck(arrayLocation, indexExpression, size)) if (arraySizeErrorCheck(arrayLocation, indexExpression, size))
{
recover(); recover();
TType arrayType = TType(publicType); }
arrayType.setArraySize(size); arrayType.setArraySize(size);
TVariable *variable = nullptr; TVariable *variable = nullptr;
if (!declareVariable(arrayLocation, identifier, arrayType, &variable)) if (!declareVariable(identifierLocation, identifier, arrayType, &variable))
recover(); recover();
TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, arrayType, identifierLocation); TIntermSymbol *symbol = intermediate.addSymbol(0, identifier, arrayType, identifierLocation);
if (variable && symbol) if (variable && symbol)
{
symbol->setId(variable->getUniqueId()); symbol->setId(variable->getUniqueId());
}
return intermediate.growAggregate(declaratorList, symbol, identifierLocation); return intermediate.growAggregate(aggregateDeclaration, symbol, identifierLocation);
} }
return nullptr; return nullptr;
} }
TIntermAggregate* TParseContext::parseInitDeclarator(TPublicType &publicType, TIntermAggregate *declaratorList, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& initLocation, TIntermTyped *initializer) TIntermAggregate *TParseContext::parseInitDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration,
const TSourceLoc &identifierLocation, const TString &identifier,
const TSourceLoc &initLocation, TIntermTyped *initializer)
{ {
// If the declaration starting this declarator list was empty (example: int,), some checks were not performed. // If the declaration starting this declarator list was empty (example: int,), some checks were not performed.
if (mDeferredSingleDeclarationErrorCheck) if (mDeferredSingleDeclarationErrorCheck)
...@@ -1447,25 +1461,25 @@ TIntermAggregate* TParseContext::parseInitDeclarator(TPublicType &publicType, TI ...@@ -1447,25 +1461,25 @@ TIntermAggregate* TParseContext::parseInitDeclarator(TPublicType &publicType, TI
if (locationDeclaratorListCheck(identifierLocation, publicType)) if (locationDeclaratorListCheck(identifierLocation, publicType))
recover(); recover();
TIntermNode* intermNode; TIntermNode *intermNode = nullptr;
if (!executeInitializer(identifierLocation, identifier, publicType, initializer, intermNode)) if (!executeInitializer(identifierLocation, identifier, publicType, initializer, &intermNode))
{ {
// //
// build the intermediate representation // build the intermediate representation
// //
if (intermNode) if (intermNode)
{ {
return intermediate.growAggregate(declaratorList, intermNode, initLocation); return intermediate.growAggregate(aggregateDeclaration, intermNode, initLocation);
} }
else else
{ {
return declaratorList; return aggregateDeclaration;
} }
} }
else else
{ {
recover(); recover();
return NULL; return nullptr;
} }
} }
......
...@@ -124,19 +124,32 @@ struct TParseContext { ...@@ -124,19 +124,32 @@ struct TParseContext {
bool areAllChildConst(TIntermAggregate* aggrNode); bool areAllChildConst(TIntermAggregate* aggrNode);
const TFunction* findFunction(const TSourceLoc& line, TFunction* pfnCall, int inputShaderVersion, bool *builtIn = 0); const TFunction* findFunction(const TSourceLoc& line, TFunction* pfnCall, int inputShaderVersion, bool *builtIn = 0);
bool executeInitializer(const TSourceLoc &line, const TString &identifier, TPublicType &pType, bool executeInitializer(const TSourceLoc &line, const TString &identifier, TPublicType &pType,
TIntermTyped *initializer, TIntermNode *&intermNode); TIntermTyped *initializer, TIntermNode **intermNode);
TPublicType addFullySpecifiedType(TQualifier qualifier, const TPublicType& typeSpecifier); TPublicType addFullySpecifiedType(TQualifier qualifier, const TPublicType& typeSpecifier);
TPublicType addFullySpecifiedType(TQualifier qualifier, TLayoutQualifier layoutQualifier, const TPublicType& typeSpecifier); TPublicType addFullySpecifiedType(TQualifier qualifier, TLayoutQualifier layoutQualifier, const TPublicType& typeSpecifier);
TIntermAggregate *parseSingleDeclaration(TPublicType &publicType, TIntermAggregate *parseSingleDeclaration(TPublicType &publicType,
const TSourceLoc &identifierOrTypeLocation, const TString &identifier); const TSourceLoc &identifierOrTypeLocation, const TString &identifier);
TIntermAggregate* parseSingleArrayDeclaration(TPublicType &publicType, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& indexLocation, TIntermTyped *indexExpression); TIntermAggregate *parseSingleArrayDeclaration(TPublicType &publicType,
TIntermAggregate* parseSingleInitDeclaration(TPublicType &publicType, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& initLocation, TIntermTyped *initializer); const TSourceLoc &identifierLocation, const TString &identifier,
TIntermAggregate* parseInvariantDeclaration(const TSourceLoc &invariantLoc, const TSourceLoc &identifierLoc, const TString *identifier, const TSymbol *symbol); const TSourceLoc &indexLocation, TIntermTyped *indexExpression);
TIntermAggregate *parseSingleInitDeclaration(TPublicType &publicType,
const TSourceLoc &identifierLocation, const TString &identifier,
const TSourceLoc &initLocation, TIntermTyped *initializer);
TIntermAggregate *parseInvariantDeclaration(const TSourceLoc &invariantLoc, const TSourceLoc &identifierLoc,
const TString *identifier, const TSymbol *symbol);
TIntermAggregate *parseDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration,
const TSourceLoc &identifierLocation, const TString &identifier);
TIntermAggregate *parseArrayDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration,
const TSourceLoc &identifierLocation, const TString &identifier,
const TSourceLoc &arrayLocation, TIntermTyped *indexExpression);
TIntermAggregate *parseInitDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration,
const TSourceLoc &identifierLocation, const TString &identifier,
const TSourceLoc &initLocation, TIntermTyped *initializer);
TIntermAggregate* parseDeclarator(TPublicType &publicType, TIntermAggregate *aggregateDeclaration, TSymbol *identifierSymbol, const TSourceLoc& identifierLocation, const TString &identifier);
TIntermAggregate* parseArrayDeclarator(TPublicType &publicType, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& arrayLocation, TIntermNode *declaratorList, TIntermTyped *indexExpression);
TIntermAggregate* parseInitDeclarator(TPublicType &publicType, TIntermAggregate *declaratorList, const TSourceLoc& identifierLocation, const TString &identifier, const TSourceLoc& initLocation, TIntermTyped *initializer);
void parseGlobalLayoutQualifier(const TPublicType &typeQualifier); void parseGlobalLayoutQualifier(const TPublicType &typeQualifier);
TFunction *addConstructorFunc(TPublicType publicType); TFunction *addConstructorFunc(TPublicType publicType);
TIntermTyped* addConstructor(TIntermNode*, TType*, TOperator, TFunction*, const TSourceLoc&); TIntermTyped* addConstructor(TIntermNode*, TType*, TOperator, TFunction*, const TSourceLoc&);
......
...@@ -883,11 +883,11 @@ init_declarator_list ...@@ -883,11 +883,11 @@ init_declarator_list
} }
| init_declarator_list COMMA identifier { | init_declarator_list COMMA identifier {
$$ = $1; $$ = $1;
$$.intermAggregate = context->parseDeclarator($$.type, $1.intermAggregate, $3.symbol, @3, *$3.string); $$.intermAggregate = context->parseDeclarator($$.type, $1.intermAggregate, @3, *$3.string);
} }
| init_declarator_list COMMA identifier LEFT_BRACKET constant_expression RIGHT_BRACKET { | init_declarator_list COMMA identifier LEFT_BRACKET constant_expression RIGHT_BRACKET {
$$ = $1; $$ = $1;
$$.intermAggregate = context->parseArrayDeclarator($$.type, @3, *$3.string, @4, $1.intermNode, $5); $$.intermAggregate = context->parseArrayDeclarator($$.type, $1.intermAggregate, @3, *$3.string, @4, $5);
} }
| init_declarator_list COMMA identifier EQUAL initializer { | init_declarator_list COMMA identifier EQUAL initializer {
$$ = $1; $$ = $1;
...@@ -1534,11 +1534,11 @@ condition ...@@ -1534,11 +1534,11 @@ condition
context->recover(); context->recover();
} }
| fully_specified_type identifier EQUAL initializer { | fully_specified_type identifier EQUAL initializer {
TIntermNode* intermNode; TIntermNode *intermNode;
if (context->boolErrorCheck(@2, $1)) if (context->boolErrorCheck(@2, $1))
context->recover(); context->recover();
if (!context->executeInitializer(@2, *$2.string, $1, $4, intermNode)) if (!context->executeInitializer(@2, *$2.string, $1, $4, &intermNode))
$$ = $4; $$ = $4;
else { else {
context->recover(); context->recover();
......
...@@ -3385,7 +3385,7 @@ yyreduce: ...@@ -3385,7 +3385,7 @@ yyreduce:
{ {
(yyval.interm) = (yyvsp[-2].interm); (yyval.interm) = (yyvsp[-2].interm);
(yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[-2].interm).intermAggregate, (yyvsp[0].lex).symbol, (yylsp[0]), *(yyvsp[0].lex).string); (yyval.interm).intermAggregate = context->parseDeclarator((yyval.interm).type, (yyvsp[-2].interm).intermAggregate, (yylsp[0]), *(yyvsp[0].lex).string);
} }
break; break;
...@@ -3394,7 +3394,7 @@ yyreduce: ...@@ -3394,7 +3394,7 @@ yyreduce:
{ {
(yyval.interm) = (yyvsp[-5].interm); (yyval.interm) = (yyvsp[-5].interm);
(yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-5].interm).intermNode, (yyvsp[-1].interm.intermTypedNode)); (yyval.interm).intermAggregate = context->parseArrayDeclarator((yyval.interm).type, (yyvsp[-5].interm).intermAggregate, (yylsp[-3]), *(yyvsp[-3].lex).string, (yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
} }
break; break;
...@@ -4605,11 +4605,11 @@ yyreduce: ...@@ -4605,11 +4605,11 @@ yyreduce:
case 246: case 246:
{ {
TIntermNode* intermNode; TIntermNode *intermNode;
if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type))) if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
context->recover(); context->recover();
if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), intermNode)) if (!context->executeInitializer((yylsp[-2]), *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), (yyvsp[0].interm.intermTypedNode), &intermNode))
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
else { else {
context->recover(); context->recover();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment