Add boolean literals
This commit is contained in:
parent
db2e88a539
commit
9dd109b90a
5 changed files with 2581 additions and 600 deletions
|
|
@ -34,6 +34,7 @@ module.exports = grammar({
|
|||
_expr: ($) => choice(
|
||||
// Literals
|
||||
$.identifier,
|
||||
$.boolean_literal,
|
||||
$.integer_literal,
|
||||
$._string_literal,
|
||||
// Composites
|
||||
|
|
@ -44,6 +45,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