Skip to content

Conversation

@WardCunningham
Copy link
Owner

We add parse rules to recognize an optional match.

optional match (mngr: Employee {name: "H. G. Cunningham"})

This is presently producing optnl in place of match.

 query
 | optnl
 | | node
 | | | elem
 | | | | bind "mngr"
 | | | | type "Employee"
 | | | | prop "name" H. G. Cunningham
 | | chain
 | end

This is emitting "code" that has lost the fact that we want an optional match.

{
  node: { bind: "mngr", type: "Employee", prop: [ "name", "H. G. Cunningham" ] },
  chain: {}
}

We hesitate here knowing we can emit whatever kind of code we want to apply with the desired semantic. This has been elusive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants