mirror of
https://github.com/cursorless-dev/cursorless.git
synced 2024-10-03 20:37:50 +03:00
Added block comments tokens to tokenizer (#479)
This commit is contained in:
parent
fc5057acd1
commit
81def893a6
@ -34,6 +34,10 @@ const FIXED_TOKENS = [
|
||||
"\\r",
|
||||
"\\n",
|
||||
"\\t",
|
||||
"/*",
|
||||
"*/",
|
||||
"<!--",
|
||||
"-->",
|
||||
];
|
||||
const REPEATABLE_SYMBOLS_REGEX = REPEATABLE_SYMBOLS.map(escapeRegExp)
|
||||
.map((s) => `${s}+`)
|
||||
|
@ -48,6 +48,8 @@ const tests: TestCase[] = [
|
||||
["``", ["`", "`"]],
|
||||
// Comments
|
||||
["// Hello world", ["//", "Hello", "world"]],
|
||||
["/* Hello world */", ["/*", "Hello", "world", "*/"]],
|
||||
["<!-- Hello world -->", ["<!--", "Hello", "world", "-->"]],
|
||||
// Hex colors
|
||||
["#aaaaaa", ["#", "aaaaaa"]],
|
||||
["#11aaaa", ["#", "11aaaa"]],
|
||||
|
Loading…
Reference in New Issue
Block a user