Add binary expression
This commit is contained in:
parent
5489bd5380
commit
25924c3c5c
5 changed files with 1259 additions and 934 deletions
|
|
@ -71,6 +71,8 @@ module.exports = grammar({
|
|||
// Composites
|
||||
$.list_expression,
|
||||
$.map_expression,
|
||||
// Operators
|
||||
$.binary_expression,
|
||||
),
|
||||
|
||||
// The Blueprint scanner makes use of Go's lexer, so copy their rule
|
||||
|
|
@ -185,6 +187,12 @@ module.exports = grammar({
|
|||
"}",
|
||||
),
|
||||
|
||||
binary_expression: ($) => prec.left(seq(
|
||||
field("left", $._expr),
|
||||
field("operator", "+"),
|
||||
field("right", $._expr),
|
||||
)),
|
||||
|
||||
// }}}
|
||||
|
||||
// Properties {{{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue