Merge branch 'master' into separate-build-phase

This commit is contained in:
Arpad Ryszka 2017-07-29 23:11:14 +02:00
commit 1fef0c5000
3 changed files with 6 additions and 6 deletions

View File

@ -145,16 +145,17 @@ func (p *choiceParser) nodeID() int { return p.id }
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", c.offset) t.Out1("parsing choice", c.offset)
// TODO: don't add documentation // TODO: don't add documentation
if p.commit&Documentation != 0 { if p.commit&Documentation != 0 {
t.Out1("fail, doc")
c.fail(c.offset) c.fail(c.offset)
return return
} }
if m, ok := c.fromStore(p.id); ok { if m, ok := c.fromStore(p.id); ok {
t.Out1("found in cache", m) t.Out1("found in store, match:", m)
return return
} }
@ -207,7 +208,7 @@ func (p *choiceParser) parse(t Trace, c *context) {
if match { if match {
c.success(to) c.success(to)
c.include(from, p.id) c.include(from, p.id)
t.Out1("success") t.Out1("choice, success")
return return
} }

View File

@ -9,7 +9,7 @@ import (
) )
func TestMML(t *testing.T) { func TestMML(t *testing.T) {
testTrace(t, "mml.parser", "mml", 0, []testItem{{ testTrace(t, "mml.parser", "mml", 1, []testItem{{
msg: "empty", msg: "empty",
node: &Node{Name: "mml"}, node: &Node{Name: "mml"},
}, { }, {

View File

@ -172,9 +172,8 @@ func (p *sequenceParser) nodeID() int { return p.id }
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", c.offset)
if p.commit&Documentation != 0 { if p.commit&Documentation != 0 {
t.Out1("fail, doc")
c.fail(c.offset) c.fail(c.offset)
return return
} }