Пример #1
0
func newFormatter(out io.Writer, toks []*lex8.Token) *formatter {
	p := fmt8.NewPrinter(out)
	return &formatter{
		Printer: p,
		toks:    newTokens(toks),
	}
}
Пример #2
0
func newFormatter(out io.Writer, tokens []*lex8.Token) *formatter {
	p := fmt8.NewPrinter(out)
	return &formatter{p, tokens, 0}
}
Пример #3
0
// PrintPkg prints a the content of a IR package
func PrintPkg(out io.Writer, pkg *Pkg) error {
	p := fmt8.NewPrinter(out)
	printPkg(p, pkg)
	return p.Err()
}