public override void VisitGotoStmt(GotoStmt x)
            {
                VisitSpecificElementProlog();

                SerializeToken(nameof(x.LabelName), x.LabelName.ToString(), x.LabelName.Span);

                base.VisitGotoStmt(x);
            }
Exemple #2
0
        public virtual bool VisitGotoStmt(GotoStmt stmt)
        {
            if (!VisitStmt(stmt))
            {
                return(false);
            }

            return(true);
        }
Exemple #3
0
        /// <summary>
        /// Visit GotoStmt, and creates the jump to defined label.
        /// </summary>
        /// <param name="x">GotoStmt</param>
        public override void VisitGotoStmt(GotoStmt x)
        {
            labelDictionary.GetOrCreateLabelData(x.LabelName, x.Position)
            .AsociateGoto(currentBasicBlock);

            //Next line could be used for label visualization, label statement shouldnt be in resulting cgf
            //currentBasicBlock.AddElement(x);

            //THIS COULD BE AN UNREACHABLE BLOCK
            currentBasicBlock = new BasicBlock();
        }
Exemple #4
0
        public override void VisitGotoStmt(GotoStmt x)
        {
            var /*!*/ label = GetLabelBlock(x.LabelName.Name.Value);

            label.Flags |= ControlFlowGraph.LabelBlockFlags.Used;   // label is used

            Connect(_current, label.TargetBlock);

            _current.NextEdge.PhpSyntax = x;

            _current = NewDeadBlock();  // any statement inside this block would be unreachable unless it is LabelStmt
        }
Exemple #5
0
 public override void VisitGotoStmt(GotoStmt x)
 {
     ConsumeToken(Tokens.T_GOTO, "goto", x.Span.Start);
     ConsumeToken(Tokens.T_STRING, x.LabelName.Name.Value);
     ConsumeToken(Tokens.T_SEMI, ";", x.Span.End - 1);
 }
Exemple #6
0
 public bool VisitGotoStmt(GotoStmt stmt)
 {
     throw new NotImplementedException();
 }
Exemple #7
0
 virtual public void VisitGotoStmt(GotoStmt x)
 {
     // x.LabelName
 }
Exemple #8
0
 override public void VisitGotoStmt(GotoStmt x)
 {
     _serializer.Serialize(typeof(GotoStmt).Name, SerializeSpan(x.Span), new NodeObj("LabelName", x.LabelName.Name.Value));
 }