Example #1
0
        public override IElement CreateCopy()
        {
            VarName e = new VarName();

            e.AddChildren(this.CopyChildren());
            return(e);
        }
Example #2
0
        public static void Parse(MoveInfo parentInfo, ParsingInfo parsingInfo, ScriptInfo scriptInfo)
        {
            VarName varName = new VarName();

            MoveInfo moveInfo = new MoveInfo(parentInfo);

            int startIndex = parentInfo.CurrentIndex;
            int length;

            // find members and arrayIndexers
            IElement next = null;

            do
            {
                length = (moveInfo.CurrentIndex + 1) - startIndex;
                next   = moveInfo.FindNextBlack(SearchDirection.LeftToRight);
            }while (next != null &&
                    (ArrayIndexer.Check(moveInfo, parsingInfo, scriptInfo) ||
                     DataMember.Check(moveInfo, parsingInfo, scriptInfo)));

            varName.AddChildren(parentInfo.CurrentElements.GetRange(startIndex, length));
            parentInfo.Replace(length, varName);
        }