def write_block(self, block_, body):
    """Outputs the boilerplate necessary for code blocks like functions.

    Args:
      block_: The Block object representing the code block.
      body: String containing Go code making up the body of the code block.
    """
    self.write('for ; πF.State() >= 0; πF.PopCheckpoint() {')
    with self.indent_block():
      self.write('switch πF.State() {')
      self.write('case 0:')
      for checkpoint in block_.checkpoints:
        self.write_tmpl('case $state: goto Label$state', state=checkpoint)
      self.write('default: panic("unexpected function state")')
      self.write('}')
      # Assume that body is aligned with goto labels.
      with self.indent_block(-1):
        self.write(body)
    self.write('}')
def write_block(self, block_, body):
    """Outputs the boilerplate necessary for code blocks like functions.

    Args:
      block_: The Block object representing the code block.
      body: String containing Go code making up the body of the code block.
    """
    self.write('for ; πF.State() >= 0; πF.PopCheckpoint() {')
    with self.indent_block():
      self.write('switch πF.State() {')
      self.write('case 0:')
      for checkpoint in block_.checkpoints:
        self.write_tmpl('case $state: goto Label$state', state=checkpoint)
      self.write('default: panic("unexpected function state")')
      self.write('}')
      # Assume that body is aligned with goto labels.
      with self.indent_block(-1):
        self.write(body)
    self.write('}')
def write_block ( self , block_ , body ) : self . write ( 'for ; πF.State() >= 0; πF.PopCheckpoint() {') with self . indent_block ( ) : self . write ( 'switch πF.State() {') self . write ( 'case 0:' ) for checkpoint in block_ . checkpoints : self . write_tmpl ( 'case $state: goto Label$state' , state = checkpoint ) self . write ( 'default: panic("unexpected function state")' ) self . write ( '}' ) # Assume that body is aligned with goto labels. with self . indent_block ( - 1 ) : self . write ( body ) self . write ( '}' )
Outputs the boilerplate necessary for code blocks like functions.

    Args:
      block_: The Block object representing the code block.
      body: String containing Go code making up the body of the code block.
Outputs the boilerplate necessary for code blocks like functions .