コード例 #1
0
 private bool IsNextNodeElse(string markerJumpPrevBody, string markerJumpAfterBody)
 {
     if (parent == null)
     {
         ASTNode node = AbstractSyntaxTree.GetParentNode(this);
         if (node != null)
         {
             ASTNode nodeNext = (node as IArea).GetNextNode(parent);
             if (nodeNext != null && nodeNext is ElseAST nodeNextElseAST)
             {
                 if (markerJumpPrevBody == "")
                 {
                     markerJumpPrevBody = ASMregisters.GetNewMarkerJumpPrevBody();
                 }
                 nodeNextElseAST.SetMarkersJump(markerJumpPrevBody, markerJumpAfterBody);
                 return(true);
             }
         }
     }
     else
     {
         ASTNode nodeNext = (parent.parent as IArea).GetNextNode(parent);
         if (nodeNext != null && nodeNext is ElseAST nodeNextElseAST)
         {
             if (markerJumpPrevBody == "")
             {
                 markerJumpPrevBody = ASMregisters.GetNewMarkerJumpPrevBody();
             }
             nodeNextElseAST.SetMarkersJump(markerJumpPrevBody, markerJumpAfterBody);
             return(true);
         }
     }
     return(false);
 }
コード例 #2
0
 public override void PrintASM(string leveltabulation, bool isNewLine = false)
 {
     if (parent == null)
     {
         AbstractSyntaxTree.GetParentNode(this);
     }
     SetJumpMark(leveltabulation, parent);
 }