Parse() public static method

public static Parse ( List &statements, int &index ) : Verb
statements List
index int
return Verb
示例#1
0
        public Define(ref List <String> statements, ref int index)
            : base(ref statements, ref index)
        {
            if (parts.Count() < 3)
            {
                throw new Exception("Invalid Define Statement");
            }
            if (parts[2].StartsWith("EXT"))
            {
                isModule = true;
                Name     = parts[3];
            }
            else if (parts[2].StartsWith("PROC"))
            {
                Name = parts[2];
            }
            Verb verb = Verb.Parse(ref statements, ref index);;

            while (!(verb is End && verb.Name.Equals(this.Name)))
            {
                Children.Add(verb);
                verb = Verb.Parse(ref statements, ref index);
            }
            Children.Add(verb); //Add the end verb
        }