BitOrchestra.Parser.AcceptLiteral C# (CSharp) Method

AcceptLiteral() public static method

Tries parsing a literal term in the given text.
public static AcceptLiteral ( string Text, int &Index, Expression &Term, int &ErrorIndex ) : bool
Text string
Index int
Term Expression
ErrorIndex int
return bool
        public static bool AcceptLiteral(string Text, ref int Index, ref Expression Term, out int ErrorIndex)
        {
            int val = 0;
            if (AcceptInteger(Text, ref Index, ref val, out ErrorIndex))
            {
                Term = new ConstantExpression(val);
                return true;
            }
            return false;
        }