Add negative integers

This commit is contained in:
Bruno BELANYI 2024-04-07 22:49:15 +01:00
parent 26b6891160
commit 57b38c01c0
5 changed files with 225 additions and 96 deletions

View file

@ -36,7 +36,7 @@ module.exports = grammar({
// The Blueprint scanner makes use of Go's lexer, so copy their rule
identifier: (_) => /[_\p{XID_Start}][_\p{XID_Continue}]*/,
integer_literal: (_) => /[0-9]+/,
integer_literal: (_) => seq(optional("-"), /[0-9]+/),
// }}}
}