BitOrchestra.Parser.Parse C# (CSharp) Method

Parse() public static method

Parses the given text and either returns true with an expression and sound options, or false with an error index.
public static Parse ( string Text, Expression &Expression, SoundOptions &Options, int &ErrorIndex ) : bool
Text string
Expression Expression
Options SoundOptions
ErrorIndex int
return bool
        public static bool Parse(string Text, out Expression Expression, out SoundOptions Options, out int ErrorIndex)
        {
            Expression = null;
            Options = new SoundOptions();
            Dictionary<string, Expression> variables = null;
            int index = 0;
            AcceptProgram(Text, ref index, ref variables, ref Options, out ErrorIndex);
            if (index == Text.Length)
            {
                variables.TryGetValue(Result, out Expression);
                return true;
            }
            return false;
        }

Same methods

Parser::Parse ( string Text, int TargetIndex, int TargetLength, Expression &Expression, SoundOptions &Options, int &ErrorIndex ) : bool