1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Regex patterns used throughout the grammar
*
* Exports actual RegExp objects to avoid double-escaping hell.
* Use these directly in grammar.js rules (no `new RegExp()` needed).
*
* Structural Archetypes:
* - icon_value: icon + text (priority, story, alias, predecessor, id)
* - icon_datetime: icon + datetime (completed_date, created_date)
* - icon_composite: icon + parts (do_date: datetime, duration, recurrence)
* - icon_list: icon + items (context)
* - icon_rich_text: icon + text/links (description)
* - marker_only: just icon (sequential)
*/
// Characters that introduce metadata fields
// Updated to include = (alias) and ~ (sequential)
const METADATA_CHARS = '$!*+@%^#><~=';
// Build a character class that excludes specific chars plus newline and brackets
const ;
// Escape chars that have special meaning inside a character class
module.exports = ;