CSLE.CLS_Environment.ParserToken C# (CSharp) Method

ParserToken() public method

public ParserToken ( string code ) : IList
code string
return IList
        public IList<Token> ParserToken(string code)
        {
            return tokenParser.Parse(code);
        }
        public ICLS_Expression Expr_CompileToken(IList<Token> listToken)

Usage Example

Example #1
0
    public object Eval(string script)
    {
        if (env == null)
        {
            Init();
        }

        var token = env.ParserToken(script);             //词法分析
        var expr  = env.Expr_CompilerToken(token, true); //语法分析,简单表达式,一句话
        var value = env.Expr_Execute(expr, content);     //执行表达式

        if (value == null)
        {
            return(null);
        }
        return(value.value);
    }
All Usage Examples Of CSLE.CLS_Environment::ParserToken