disable tracing

This commit is contained in:
Arpad Ryszka 2017-07-29 23:28:19 +02:00
parent 0b699ece28
commit 7ccd1a439c
2 changed files with 14 additions and 14 deletions

View File

@ -100,22 +100,22 @@ func (p *choiceParser) storeIncluded(c *context, n *Node) {
}
func (p *choiceParser) parse(t Trace, c *context) {
t = t.Extend(p.name)
t.Out1("parsing choice", c.offset)
// t = t.Extend(p.name)
// t.Out1("parsing choice", c.offset)
if p.commit&Documentation != 0 {
t.Out1("fail, doc")
// t.Out1("fail, doc")
c.fail(c.offset)
return
}
if m, ok := c.fromStore(p.id); ok {
t.Out1("found in store, match:", m)
if _, ok := c.fromStore(p.id); ok {
// t.Out1("found in store, match:", m)
return
}
if c.excluded(c.offset, p.id) {
t.Out1("excluded")
// t.Out1("excluded")
c.fail(c.offset)
return
}
@ -156,13 +156,13 @@ func (p *choiceParser) parse(t Trace, c *context) {
}
if match {
t.Out1("choice, success")
// t.Out1("choice, success")
c.success(node)
c.include(initialOffset, p.id)
return
}
t.Out1("fail")
// t.Out1("fail")
c.store.set(node.From, p.id, nil)
c.fail(node.From)
c.include(initialOffset, p.id)

View File

@ -121,17 +121,17 @@ func (p *sequenceParser) storeIncluded(c *context, n *Node) {
}
func (p *sequenceParser) parse(t Trace, c *context) {
t = t.Extend(p.name)
t.Out1("parsing sequence", c.offset)
// t = t.Extend(p.name)
// t.Out1("parsing sequence", c.offset)
if p.commit&Documentation != 0 {
t.Out1("fail, doc")
// t.Out1("fail, doc")
c.fail(c.offset)
return
}
if c.excluded(c.offset, p.id) {
t.Out1("excluded")
// t.Out1("excluded")
c.fail(c.offset)
return
}
@ -157,7 +157,7 @@ func (p *sequenceParser) parse(t Trace, c *context) {
if !m {
if currentCount < ranges[0][0] {
t.Out1("fail, item failed")
// t.Out1("fail, item failed")
// c.store.set(node.From, p.id, nil)
c.fail(node.From)
c.include(initialOffset, p.id)
@ -186,7 +186,7 @@ func (p *sequenceParser) parse(t Trace, c *context) {
}
}
t.Out1("success, items parsed")
// t.Out1("success, items parsed")
// c.store.set(node.From, p.id, node)
for _, includedBy := range p.includedBy {