Skip to content

Commit cbd5114

Browse files
committed
small refactor
1 parent 78826c7 commit cbd5114

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

dictionary/parser.ts

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,8 @@ import {
3232
VerbForms,
3333
} from "./type.ts";
3434

35-
const RESERVED_SYMBOLS = [
36-
"#",
37-
"(",
38-
")",
39-
"*",
40-
"+",
41-
"/",
42-
":",
43-
";",
44-
"<",
45-
"=",
46-
">",
47-
"@",
48-
"[",
49-
"\\",
50-
"]",
51-
"^",
52-
"`",
53-
"{",
54-
"|",
55-
"}",
56-
"~",
57-
];
58-
const WORDS = new RegExp(`[^${escapeRegex(RESERVED_SYMBOLS.join(""))}]`);
35+
const RESERVED_SYMBOLS = "#()*+/:;<=>@[\\]^`{|}~";
36+
const WORDS = new RegExp(`[^${escapeRegex(RESERVED_SYMBOLS)}]`);
5937

6038
const comment = match(/#[^\n\r]*/, "comment");
6139
const spaces = sourceOnly(all(choiceOnlyOne(match(/\s/, "space"), comment)));

0 commit comments

Comments
 (0)