コード例 #1
0
        public override IElement CreateCopy()
        {
            WaittillFrameEndStatement e = new WaittillFrameEndStatement();

            e.AddChildren(this.CopyChildren());
            return(e);
        }
コード例 #2
0
        private static void Parse(MoveInfo parentInfo, ParsingInfo parsingInfo, ScriptInfo scriptInfo)
        {
            WaittillFrameEndStatement waittillFrameEnd = new WaittillFrameEndStatement();
            MoveInfo moveInfo = new MoveInfo(parentInfo);

            // terminal
            IElement terminalTry = moveInfo.FindNextBlack(SearchDirection.LeftToRight);

            if (terminalTry == null || !terminalTry.IsTT(TokenType.SemiColon))
            {
                throw new SyntaxException("Missing directive ';'?", parentInfo.GetErrorInfo());
            }

            // build
            int startIndex = parentInfo.CurrentIndex;
            int length     = (moveInfo.CurrentIndex + 1) - startIndex;

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