Exemple #1
0
        public IExpression ReadExpression(string expression)
        {
            CodeSection section = CodeSection.FromString(expression);

            if (!TryReadExpression(section, out IExpression e))
            {
                throw new FormatException("Unable to read expression!");
            }

            return(e);
        }
Exemple #2
0
        public bool TryReadExpression(CodeSection section, out IExpression e)
        {
            foreach (ExpressionReader reader in readers)
            {
                if (reader.TryReadExpression(this, section, out e))
                {
                    return(true);
                }
            }

            e = null;
            return(false);
        }
Exemple #3
0
 public abstract bool TryReadExpression(CodeReader reader, CodeSection code, out IExpression e);