Exemplo n.º 1
0
    //IDebugExpressionEvaluator
    public  HRESULT Parse( 
      [In,MarshalAs(UnmanagedType.LPWStr)]
      string                    pszExpression,
      PARSEFLAGS                  flags,
      uint                        radix,
      out string                  pbstrErrorMessages,
      out uint                    perrorCount,
      out IDebugParsedExpression  ppparsedExpression
      ) 
    {
      
      HRESULT hr = (HRESULT)HResult.S_OK;
      perrorCount = 0;
      pbstrErrorMessages = null;
      ppparsedExpression = null;
      ErrorNodeList errors =  new ErrorNodeList();
      Module symbolTable = new Module();
      Document doc = this.cciEvaluator.ExprCompiler.CreateDocument(null, 1, pszExpression);
      IParser exprParser = this.cciEvaluator.ExprCompiler.CreateParser(doc.Name, doc.LineNumber, doc.Text, symbolTable, errors, null);
      Expression parsedExpression = exprParser.ParseExpression();

      perrorCount = (uint)errors.Count;
      if (perrorCount > 0)
        pbstrErrorMessages = errors[0].GetMessage();
      else
        ppparsedExpression = new BaseParsedExpression(pszExpression, parsedExpression, this);

      return hr;
    }
Exemplo n.º 2
0
        //IDebugExpressionEvaluator
        public HRESULT Parse(
            [In, MarshalAs(UnmanagedType.LPWStr)]
            string pszExpression,
            PARSEFLAGS flags,
            uint radix,
            out string pbstrErrorMessages,
            out uint perrorCount,
            out IDebugParsedExpression ppparsedExpression
            )
        {
            HRESULT hr = (HRESULT)HResult.S_OK;

            perrorCount        = 0;
            pbstrErrorMessages = null;
            ppparsedExpression = null;
            ErrorNodeList errors           = new ErrorNodeList();
            Module        symbolTable      = new Module();
            Document      doc              = this.cciEvaluator.ExprCompiler.CreateDocument(null, 1, pszExpression);
            IParser       exprParser       = this.cciEvaluator.ExprCompiler.CreateParser(doc.Name, doc.LineNumber, doc.Text, symbolTable, errors, null);
            Expression    parsedExpression = exprParser.ParseExpression();

            perrorCount = (uint)errors.Count;
            if (perrorCount > 0)
            {
                pbstrErrorMessages = errors[0].GetMessage();
            }
            else
            {
                ppparsedExpression = new BaseParsedExpression(pszExpression, parsedExpression, this);
            }

            return(hr);
        }
Exemplo n.º 3
0
 public int Parse(string upstrExpression, uint dwFlags, uint nRadix, out string pbstrError, out uint pichError, out IDebugParsedExpression ppParsedExpression)
 {
   pbstrError = null;
   pichError = 0;
   ppParsedExpression = (IDebugParsedExpression)null;
   return VSConstants.S_OK;
 }
Exemplo n.º 4
0
 public int Parse(string upstrExpression, enum_PARSEFLAGS dwFlags, uint nRadix, out string pbstrError, out uint pichError, out IDebugParsedExpression ppParsedExpression)
 {
     pbstrError = "";
     pichError = 0;
     ppParsedExpression = null;
     return VSConstants.E_NOTIMPL;
 }
 public int Parse(string upstrExpression, uint dwFlags, uint nRadix, out string pbstrError, out uint pichError, out IDebugParsedExpression ppParsedExpression)
 {
     pbstrError = null;
     pichError = 0;
     if (string.IsNullOrEmpty(upstrExpression))
     {
         ppParsedExpression = null;
         return VSConstants.E_INVALIDARG;
     }
     ppParsedExpression = new AsmDebugParsedExpression(vs, upstrExpression);
     return VSConstants.S_OK;
 }
Exemplo n.º 6
0
 public int Parse(string upstrExpression, uint dwFlags, uint nRadix, out string pbstrError, out uint pichError, out IDebugParsedExpression ppParsedExpression)
 {
     pbstrError = null;
     pichError  = 0;
     if (string.IsNullOrEmpty(upstrExpression))
     {
         ppParsedExpression = null;
         return(VSConstants.E_INVALIDARG);
     }
     ppParsedExpression = new AsmDebugParsedExpression(vs, upstrExpression);
     return(VSConstants.S_OK);
 }
Exemplo n.º 7
0
 public int Parse(string upstrExpression, enum_PARSEFLAGS dwFlags, uint nRadix, out string pbstrError, out uint pichError, out IDebugParsedExpression ppParsedExpression)
 {
     pbstrError         = "";
     pichError          = 0;
     ppParsedExpression = null;
     return(VSConstants.E_NOTIMPL);
 }
Exemplo n.º 8
0
 public int Parse(string upstrExpression, uint dwFlags, uint nRadix, out string pbstrError, out uint pichError, out IDebugParsedExpression ppParsedExpression)
 {
     pbstrError         = null;
     pichError          = 0;
     ppParsedExpression = (IDebugParsedExpression)null;
     return(VSConstants.S_OK);
 }