From 21819aa90535780930950906552af63b17b3720f Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Wed, 4 Sep 2024 17:47:43 -0700 Subject: [PATCH] Dart: support digit separators --- mode/dart/dart.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mode/dart/dart.js b/mode/dart/dart.js index ba9ff3dd2c..cbbf391cc5 100644 --- a/mode/dart/dart.js +++ b/mode/dart/dart.js @@ -44,6 +44,8 @@ blockKeywords: set(blockKeywords), builtin: set(builtins), atoms: set(atoms), + // clike numbers without the suffixes, and with '_' separators. + number: /^(?:0x[a-f\d_]+|(?:[\d_]+\.?[\d_]*|\.[\d_]+)(?:e[-+]?[\d_]+)?)/i, hooks: { "@": function(stream) { stream.eatWhile(/[\w\$_\.]/);