Add boolean literals
This commit is contained in:
parent
37ee75c64d
commit
03fa5fdf85
5 changed files with 2581 additions and 600 deletions
|
|
@ -35,6 +35,7 @@ module.exports = grammar({
|
|||
_expr: ($) => choice(
|
||||
// Literals
|
||||
$.identifier,
|
||||
$.boolean_literal,
|
||||
$.integer_literal,
|
||||
$._string_literal,
|
||||
// Composites
|
||||
|
|
@ -45,6 +46,8 @@ module.exports = grammar({
|
|||
// The Blueprint scanner makes use of Go's lexer, so copy their rule
|
||||
identifier: (_) => /[_\p{XID_Start}][_\p{XID_Continue}]*/,
|
||||
|
||||
boolean_literal: (_) => choice("true", "false"),
|
||||
|
||||
integer_literal: (_) => seq(optional("-"), /[0-9]+/),
|
||||
|
||||
// The Blueprint scanner makes use of Go's lexer, so copy their rule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue