all repos

clerk @ 7596b2a

missing tooling for ledger/hledger

clerk/journal/printer/testdata/directives.txtar (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
add support of subdirectives and it's highlights, 1 month ago
1
-- input --
2
; Directives
3
account Assets:Cash ; cash account
4
account Assets:Bank
5
  type A
6
  note main bank account  ; bank note
7
  alias bank
8
  alias checking  ; checking alias
9
  ; some note
10
  # hash comment
11
commodity $
12
commodity UAH
13
commodity EUR
14
  format EUR 1.000,00  ; euro format
15
commodity CAD
16
  format 1 000.00 CAD
17
commodity 1000.00 USD
18
commodity $1000.00
19
commodity 1,000.00 UAH
20
include ./other.journal
21
include ../one../another.journal
22
alias Assets:Checking = Assets:Cash
23
payee "Test Payee"
24
tag "important"
25
tag something-else
26
year 2026
27
decimal-mark ,
28
29
; Market price
30
P 2026/01/15 12:00:00 GOOG $150.00
31
32
; Conversion
33
C 100.00$ = 85.00€  ; test comment
34
35
; Default commodity
36
D $1,000.00
37
38
; N directive
39
N $
40
41
; Apply/end
42
apply account Expenses
43
end
44
45
; Comment block
46
comment
47
Some notes about the file
48
end comment
49
50
-- expect --
51
; Directives
52
account Assets:Cash  ; cash account
53
account Assets:Bank
54
  type A
55
  note main bank account  ; bank note
56
  alias bank
57
  alias checking  ; checking alias
58
  ; some note
59
  # hash comment
60
commodity $
61
commodity UAH
62
commodity EUR
63
  format EUR 1.000,00  ; euro format
64
commodity CAD
65
  format 1 000.00 CAD
66
commodity 1000.00 USD
67
commodity $1000.00
68
commodity 1,000.00 UAH
69
include ./other.journal
70
include ../one../another.journal
71
alias Assets:Checking = Assets:Cash
72
payee "Test Payee"
73
tag important
74
tag something-else
75
year 2026
76
decimal-mark ,
77
78
; Market price
79
P 2026-01-15 12:00:00 GOOG 150.00$
80
81
; Conversion
82
C 100.00$ = 85.00€  ; test comment
83
84
; Default commodity
85
D 1,000.00$
86
87
; N directive
88
N $
89
; Apply/end
90
apply account Expenses
91
end
92
93
; Comment block
94
comment
95
Some notes about the file
96
end