mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
cmd/easm: print debug to stderr
This commit is contained in:
parent
10a090a75a
commit
75bb2958cc
2 changed files with 3 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
|
@ -168,7 +169,7 @@ func (l *Lexer) emit(t itemType) {
|
|||
item := item{t, l.lineno, l.blob()}
|
||||
|
||||
if l.debug {
|
||||
fmt.Printf("%04d: (%-20v) %s\n", item.lineno, item.typ, item.text)
|
||||
fmt.Fprintf(os.Stderr, "%04d: (%-20v) %s\n", item.lineno, item.typ, item.text)
|
||||
}
|
||||
|
||||
l.items <- item
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ func newCompiler(debug bool) *Compiler {
|
|||
// position.
|
||||
func (c *Compiler) feed(ch <-chan item) {
|
||||
for i := range ch {
|
||||
fmt.Println(c.pc, i.text)
|
||||
switch i.typ {
|
||||
case number:
|
||||
num := common.String2Big(i.text).Bytes()
|
||||
|
|
@ -133,7 +132,7 @@ func (c *Compiler) feed(ch <-chan item) {
|
|||
c.tokens = append(c.tokens, i)
|
||||
}
|
||||
if c.debug {
|
||||
fmt.Println("found", len(c.labels), "labels")
|
||||
fmt.Sprintln(os.Stderr, "found", len(c.labels), "labels")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue