//-------------------------------------------------------------------------------------------
// ParseConstructorCall
//
// ConstructorCall :
// 'this' Arguments
// 'super' Arguments
//--------------------------------------------------------------------------------------------
private AST ParseConstructorCall(Context superCtx){
bool isSuperConstructorCall = JSToken.Super == this.currentToken.token;
GetNextToken();
Context listCtx = this.currentToken.Clone();
ASTList args = new ASTList(listCtx);
this.noSkipTokenSet.Add(NoSkipTokenSet.s_EndOfStatementNoSkipTokenSet);
this.noSkipTokenSet.Add(NoSkipTokenSet.s_ParenToken);
try{
args = ParseExpressionList(JSToken.RightParen);
GetNextToken(); //Skip the )
}catch(RecoveryTokenException exc){
if (exc._partiallyComputedNode != null)
args = (ASTList)exc._partiallyComputedNode;
if (IndexOfToken(NoSkipTokenSet.s_ParenToken, exc) == -1
&& IndexOfToken(NoSkipTokenSet.s_EndOfStatementNoSkipTokenSet, exc) == -1){
exc._partiallyComputedNode = new ConstructorCall(superCtx, args, isSuperConstructorCall);
throw exc;
}else{
if (exc._token == JSToken.RightParen)
GetNextToken();
}
}finally{
this.noSkipTokenSet.Remove(NoSkipTokenSet.s_ParenToken);
this.noSkipTokenSet.Remove(NoSkipTokenSet.s_EndOfStatementNoSkipTokenSet);
}
superCtx.UpdateWith(listCtx);
return new ConstructorCall(superCtx, args, isSuperConstructorCall);
}