Microsoft.JScript.Context.UpdateWith C# (CSharp) Метод

UpdateWith() приватный Метод

private UpdateWith ( Context other ) : void
other Context
Результат void
    internal void UpdateWith(Context other){
      this.endPos = other.endPos;
      this.endLineNumber = other.endLineNumber;
      this.endLinePos = other.endLinePos;
    }
    

Usage Example

Пример #1
0
      //-------------------------------------------------------------------------------------------
      //  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);
      }
All Usage Examples Of Microsoft.JScript.Context::UpdateWith