Microsoft.JScript.Context.Clone C# (CSharp) Method

Clone() private method

private Clone ( ) : Context
return Context
    internal Context Clone(){
      Context context = new Context(this.document, this.source_string, this.lineNumber, this.startLinePos, this.startPos, 
                         this.endLineNumber, this.endLinePos, this.endPos, this.token);
      context.errorReported = this.errorReported;
      return context;
    }
    

Usage Example

Example #1
0
      //---------------------------------------------------------------------------------------
      // JSParser
      //
      // create a parser with a context. The context is the code that has to be compiled.
      // Typically used by the runtime
      //---------------------------------------------------------------------------------------
      public JSParser(Context context){
        this.sourceContext = context;
        this.currentToken = context.Clone();
        this.scanner = new JSScanner(this.currentToken);
        this.noSkipTokenSet = new NoSkipTokenSet();

        this.errorToken = null;
        this.program = null;
        this.blockType = new ArrayList(16);
        this.labelTable = new SimpleHashtable(16);
        this.finallyEscaped = 0;
        this.Globals = context.document.engine.Globals;
        this.Severity = 5;
      }
All Usage Examples Of Microsoft.JScript.Context::Clone