github.com/arnodel/golua@v0.0.0-20230215163904-e0b5347eaaa1/ast/condstat.go (about)

     1  package ast
     2  
     3  // CondStat is a conditional statement, used in e.g. if statements and while /
     4  // repeat until loops.
     5  type CondStat struct {
     6  	Cond ExpNode
     7  	Body BlockStat
     8  }
     9  
    10  // HWrite prints a tree representation of the node.
    11  func (s CondStat) HWrite(w HWriter) {
    12  	s.Cond.HWrite(w)
    13  	w.Next()
    14  	w.Writef("body: ")
    15  	s.Body.HWrite(w)
    16  }