コード例 #1
0
 internal ScriptObject LoadString(String strBreviary, String strBuffer, ScriptContext context)
 {
     try {
         m_StackInfoStack.Clear();
         ScriptLexer scriptLexer = new ScriptLexer(strBuffer);
         strBreviary = Util.IsNullOrEmpty(strBreviary) ? scriptLexer.GetBreviary() : strBreviary;
         ScriptParser     scriptParser     = new ScriptParser(this, scriptLexer.GetTokens(), strBreviary);
         ScriptExecutable scriptExecutable = scriptParser.Parse();
         return(new ScriptContext(this, scriptExecutable, context, Executable_Block.Context).Execute());
     } catch (System.Exception e) {
         throw new ScriptException("load buffer [" + strBreviary + "] is error : " + e.ToString());
     }
 }
コード例 #2
0
 internal ScriptObject LoadString(String strBreviary, String strBuffer, ScriptContext context, bool clearStack)
 {
     try {
         if (Util.IsNullOrEmpty(strBuffer))
         {
             return(m_Null);
         }
         if (clearStack)
         {
             m_StackInfoStack.Clear();
         }
         ScriptLexer scriptLexer = new ScriptLexer(strBuffer, strBreviary);
         return(Load(scriptLexer.GetBreviary(), scriptLexer.GetTokens(), context));
     } catch (System.Exception e) {
         throw new ScriptException("load buffer [" + strBreviary + "] is error : " + e.ToString());
     }
 }
コード例 #3
0
        internal ScriptObject LoadString(string strBreviary, string strBuffer, ScriptContext context, bool clearStack)
        {
            ScriptObject obj2;

            try
            {
                if (Util.IsNullOrEmpty(strBuffer))
                {
                    return(this.m_Null);
                }
                if (clearStack)
                {
                    this.m_StackInfoStack.Clear();
                }
                ScriptLexer lexer = new ScriptLexer(strBuffer, strBreviary);
                obj2 = this.Load(lexer.GetBreviary(), lexer.GetTokens(), context);
            }
            catch (System.Exception exception)
            {
                throw new ScriptException("load buffer [" + strBreviary + "] is error : " + exception.ToString());
            }
            return(obj2);
        }