Skip to content

Instantly share code, notes, and snippets.

@ionoy
Created April 21, 2017 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ionoy/900bb1c1cae55c3ba21e7488b011a8ea to your computer and use it in GitHub Desktop.
Save ionoy/900bb1c1cae55c3ba21e7488b011a8ea to your computer and use it in GitHub Desktop.
[ExplicitSpaces]
syntax Binding = "bind" s Path=BindingPath? Source=("from" s BindingSource)? Converter=("convert" s LambdaExpr s)? ConverterBack=("convertback" s LambdaExpr s)? Settings=("set" s "[" s (!"set" NodeMember; ContentDelimiter)* s "]")?;
syntax BindingPath
{
| StringLiteral
| Parameter = "$" Key=Reference
| QRef = Key=QualifiedReference
}
syntax BindingSource
{
| This = "$this"
| Viewmodel = "$viewmodel"
| Template = "$template"
| Ancestor = "$ancestor" "<" Type=QualifiedReference ">" Level=("(" Digits ")")?
| PreviousData = "$previous"
| Name = StringLiteral
| Reference = !Keyword Key=QualifiedReference
| Resource = "$resource" ResourceKey=Reference
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment