disable tracing
This commit is contained in:
parent
0b699ece28
commit
7ccd1a439c
16
choice.go
16
choice.go
@ -100,22 +100,22 @@ func (p *choiceParser) storeIncluded(c *context, n *Node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *choiceParser) parse(t Trace, c *context) {
|
func (p *choiceParser) parse(t Trace, c *context) {
|
||||||
t = t.Extend(p.name)
|
// t = t.Extend(p.name)
|
||||||
t.Out1("parsing choice", c.offset)
|
// t.Out1("parsing choice", c.offset)
|
||||||
|
|
||||||
if p.commit&Documentation != 0 {
|
if p.commit&Documentation != 0 {
|
||||||
t.Out1("fail, doc")
|
// t.Out1("fail, doc")
|
||||||
c.fail(c.offset)
|
c.fail(c.offset)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if m, ok := c.fromStore(p.id); ok {
|
if _, ok := c.fromStore(p.id); ok {
|
||||||
t.Out1("found in store, match:", m)
|
// t.Out1("found in store, match:", m)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.excluded(c.offset, p.id) {
|
if c.excluded(c.offset, p.id) {
|
||||||
t.Out1("excluded")
|
// t.Out1("excluded")
|
||||||
c.fail(c.offset)
|
c.fail(c.offset)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -156,13 +156,13 @@ func (p *choiceParser) parse(t Trace, c *context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if match {
|
if match {
|
||||||
t.Out1("choice, success")
|
// t.Out1("choice, success")
|
||||||
c.success(node)
|
c.success(node)
|
||||||
c.include(initialOffset, p.id)
|
c.include(initialOffset, p.id)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Out1("fail")
|
// t.Out1("fail")
|
||||||
c.store.set(node.From, p.id, nil)
|
c.store.set(node.From, p.id, nil)
|
||||||
c.fail(node.From)
|
c.fail(node.From)
|
||||||
c.include(initialOffset, p.id)
|
c.include(initialOffset, p.id)
|
||||||
|
12
sequence.go
12
sequence.go
@ -121,17 +121,17 @@ func (p *sequenceParser) storeIncluded(c *context, n *Node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *sequenceParser) parse(t Trace, c *context) {
|
func (p *sequenceParser) parse(t Trace, c *context) {
|
||||||
t = t.Extend(p.name)
|
// t = t.Extend(p.name)
|
||||||
t.Out1("parsing sequence", c.offset)
|
// t.Out1("parsing sequence", c.offset)
|
||||||
|
|
||||||
if p.commit&Documentation != 0 {
|
if p.commit&Documentation != 0 {
|
||||||
t.Out1("fail, doc")
|
// t.Out1("fail, doc")
|
||||||
c.fail(c.offset)
|
c.fail(c.offset)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.excluded(c.offset, p.id) {
|
if c.excluded(c.offset, p.id) {
|
||||||
t.Out1("excluded")
|
// t.Out1("excluded")
|
||||||
c.fail(c.offset)
|
c.fail(c.offset)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ func (p *sequenceParser) parse(t Trace, c *context) {
|
|||||||
|
|
||||||
if !m {
|
if !m {
|
||||||
if currentCount < ranges[0][0] {
|
if currentCount < ranges[0][0] {
|
||||||
t.Out1("fail, item failed")
|
// t.Out1("fail, item failed")
|
||||||
// c.store.set(node.From, p.id, nil)
|
// c.store.set(node.From, p.id, nil)
|
||||||
c.fail(node.From)
|
c.fail(node.From)
|
||||||
c.include(initialOffset, p.id)
|
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)
|
// c.store.set(node.From, p.id, node)
|
||||||
for _, includedBy := range p.includedBy {
|
for _, includedBy := range p.includedBy {
|
||||||
|
Loading…
Reference in New Issue
Block a user