diff --git a/choice.go b/choice.go index c5634f2..bf77cc9 100644 --- a/choice.go +++ b/choice.go @@ -145,16 +145,17 @@ func (p *choiceParser) nodeID() int { return p.id } func (p *choiceParser) parse(t Trace, c *context) { t = t.Extend(p.name) - t.Out1("parsing", c.offset) + t.Out1("parsing choice", c.offset) // TODO: don't add documentation if p.commit&Documentation != 0 { + t.Out1("fail, doc") c.fail(c.offset) return } if m, ok := c.fromStore(p.id); ok { - t.Out1("found in cache", m) + t.Out1("found in store, match:", m) return } @@ -207,7 +208,7 @@ func (p *choiceParser) parse(t Trace, c *context) { if match { c.success(to) c.include(from, p.id) - t.Out1("success") + t.Out1("choice, success") return } diff --git a/mml_test.go b/mml_test.go index 0921296..fb519a5 100644 --- a/mml_test.go +++ b/mml_test.go @@ -9,7 +9,7 @@ import ( ) func TestMML(t *testing.T) { - testTrace(t, "mml.parser", "mml", 0, []testItem{{ + testTrace(t, "mml.parser", "mml", 1, []testItem{{ msg: "empty", node: &Node{Name: "mml"}, }, { diff --git a/sequence.go b/sequence.go index e41d406..b952dc0 100644 --- a/sequence.go +++ b/sequence.go @@ -172,9 +172,8 @@ func (p *sequenceParser) nodeID() int { return p.id } func (p *sequenceParser) parse(t Trace, c *context) { t = t.Extend(p.name) - t.Out1("parsing", c.offset) - if p.commit&Documentation != 0 { + t.Out1("fail, doc") c.fail(c.offset) return }