mirror of
https://github.com/cursorless-dev/cursorless.git
synced 2024-10-04 04:47:29 +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",
|
"\\r",
|
||||||
"\\n",
|
"\\n",
|
||||||
"\\t",
|
"\\t",
|
||||||
|
"/*",
|
||||||
|
"*/",
|
||||||
|
"<!--",
|
||||||
|
"-->",
|
||||||
];
|
];
|
||||||
const REPEATABLE_SYMBOLS_REGEX = REPEATABLE_SYMBOLS.map(escapeRegExp)
|
const REPEATABLE_SYMBOLS_REGEX = REPEATABLE_SYMBOLS.map(escapeRegExp)
|
||||||
.map((s) => `${s}+`)
|
.map((s) => `${s}+`)
|
||||||
|
@ -48,6 +48,8 @@ const tests: TestCase[] = [
|
|||||||
["``", ["`", "`"]],
|
["``", ["`", "`"]],
|
||||||
// Comments
|
// Comments
|
||||||
["// Hello world", ["//", "Hello", "world"]],
|
["// Hello world", ["//", "Hello", "world"]],
|
||||||
|
["/* Hello world */", ["/*", "Hello", "world", "*/"]],
|
||||||
|
["<!-- Hello world -->", ["<!--", "Hello", "world", "-->"]],
|
||||||
// Hex colors
|
// Hex colors
|
||||||
["#aaaaaa", ["#", "aaaaaa"]],
|
["#aaaaaa", ["#", "aaaaaa"]],
|
||||||
["#11aaaa", ["#", "11aaaa"]],
|
["#11aaaa", ["#", "11aaaa"]],
|
||||||
|
Loading…
Reference in New Issue
Block a user