clerk/internal/lsp/testdata/semantic-directives.txtar (view raw)
| 1 | -- in.journal -- |
| 2 | account expenses:food |
| 3 | account expenses:food ; note |
| 4 | |
| 5 | alias old = new |
| 6 | alias old = new ; alias note |
| 7 | |
| 8 | payee Some Store |
| 9 | payee Some Store ; payee note |
| 10 | |
| 11 | tag foo |
| 12 | tag foo ; tag note |
| 13 | |
| 14 | year 2024 |
| 15 | year 2024 ; year note |
| 16 | |
| 17 | Y 2024 |
| 18 | Y 2024 ; Y note |
| 19 | |
| 20 | apply account expenses |
| 21 | end apply |
| 22 | apply account expenses ; apply note |
| 23 | end apply ; end note |
| 24 | |
| 25 | apply tag hashtag |
| 26 | end apply |
| 27 | apply tag hashtag ; apply tag note |
| 28 | end apply ; end note |
| 29 | |
| 30 | apply fixed CAD $0.90 |
| 31 | end apply |
| 32 | apply fixed CAD $0.90 ; apply fixed note |
| 33 | end apply ; end note |
| 34 | |
| 35 | N ignored |
| 36 | N ignored ; N note |
| 37 | N $ |
| 38 | N $ ; N dollar note |
| 39 | |
| 40 | D $1,000.00 |
| 41 | D $1,000.00 ; D note |
| 42 | |
| 43 | P 2024-01-15 USD 1.05 |
| 44 | P 2024-01-15 USD 1.05 ; P note |
| 45 | P 2024-01-01 12:00:00 USD 40.50 |
| 46 | P 2024-01-01 12:00:00 USD 40.50 ; P time note |
| 47 | |
| 48 | C 100 USD = 90 EUR |
| 49 | C 100 USD = 90 EUR ; C note |
| 50 | |
| 51 | decimal-mark . |
| 52 | decimal-mark . ; decimal note |
| 53 | |
| 54 | include foo.journal |
| 55 | include foo.journal ; include note |
| 56 | |
| 57 | commodity USD |
| 58 | commodity USD ; commodity note |
| 59 | |
| 60 | commodity INR |
| 61 | format INR 1,00,00,000.00 |
| 62 | commodity INR ; commodity INR note |
| 63 | format INR 1,00,00,000.00 |
| 64 | |
| 65 | commodity 1,000.00 UAH |
| 66 | commodity 1,000.00 UAH ; commodity amount note |
| 67 | commodity UAH |
| 68 | format 1 000.00 UAH |
| 69 | commodity UAH ; commodity UAH note |
| 70 | format 1 000.00 UAH |
| 71 | |
| 72 | -- expect -- |
| 73 | 0:0+7 keyword |
| 74 | 0:8+13 namespace |
| 75 | 1:0+7 keyword |
| 76 | 1:8+13 namespace |
| 77 | 1:23+6 comment |
| 78 | 3:0+5 keyword |
| 79 | 3:6+3 namespace |
| 80 | 3:10+1 operator |
| 81 | 3:12+3 namespace |
| 82 | 4:0+5 keyword |
| 83 | 4:6+3 namespace |
| 84 | 4:10+1 operator |
| 85 | 4:12+3 namespace |
| 86 | 4:17+12 comment |
| 87 | 6:0+5 keyword |
| 88 | 6:6+10 property |
| 89 | 7:0+5 keyword |
| 90 | 7:6+10 property |
| 91 | 7:18+12 comment |
| 92 | 9:0+3 keyword |
| 93 | 9:4+3 property |
| 94 | 10:0+3 keyword |
| 95 | 10:4+3 property |
| 96 | 10:9+10 comment |
| 97 | 12:0+4 keyword |
| 98 | 12:5+4 property |
| 99 | 13:0+4 keyword |
| 100 | 13:5+4 property |
| 101 | 13:11+11 comment |
| 102 | 15:0+1 keyword |
| 103 | 15:2+4 property |
| 104 | 16:0+1 keyword |
| 105 | 16:2+4 property |
| 106 | 16:8+8 comment |
| 107 | 18:0+5 keyword |
| 108 | 18:6+16 property |
| 109 | 19:0+3 keyword |
| 110 | 19:4+5 property |
| 111 | 20:0+5 keyword |
| 112 | 20:6+16 property |
| 113 | 20:24+12 comment |
| 114 | 21:0+3 keyword |
| 115 | 21:4+5 property |
| 116 | 21:11+10 comment |
| 117 | 23:0+5 keyword |
| 118 | 23:6+11 property |
| 119 | 24:0+3 keyword |
| 120 | 24:4+5 property |
| 121 | 25:0+5 keyword |
| 122 | 25:6+11 property |
| 123 | 25:19+16 comment |
| 124 | 26:0+3 keyword |
| 125 | 26:4+5 property |
| 126 | 26:11+10 comment |
| 127 | 28:0+5 keyword |
| 128 | 28:6+15 property |
| 129 | 29:0+3 keyword |
| 130 | 29:4+5 property |
| 131 | 30:0+5 keyword |
| 132 | 30:6+15 property |
| 133 | 30:23+18 comment |
| 134 | 31:0+3 keyword |
| 135 | 31:4+5 property |
| 136 | 31:11+10 comment |
| 137 | 33:0+1 keyword |
| 138 | 33:2+7 property |
| 139 | 34:0+1 keyword |
| 140 | 34:2+7 property |
| 141 | 34:11+8 comment |
| 142 | 35:0+1 keyword |
| 143 | 35:2+1 property |
| 144 | 36:0+1 keyword |
| 145 | 36:2+1 property |
| 146 | 36:5+15 comment |
| 147 | 38:0+1 keyword |
| 148 | 38:2+1 type |
| 149 | 38:3+8 number |
| 150 | 39:0+1 keyword |
| 151 | 39:2+1 type |
| 152 | 39:3+8 number |
| 153 | 39:13+8 comment |
| 154 | 41:0+1 keyword |
| 155 | 41:2+10 class |
| 156 | 41:13+3 type |
| 157 | 41:17+4 number |
| 158 | 42:0+1 keyword |
| 159 | 42:2+10 class |
| 160 | 42:13+3 type |
| 161 | 42:17+4 number |
| 162 | 42:23+8 comment |
| 163 | 43:0+1 keyword |
| 164 | 43:2+10 class |
| 165 | 43:13+8 class |
| 166 | 43:22+3 type |
| 167 | 43:26+5 number |
| 168 | 44:0+1 keyword |
| 169 | 44:2+10 class |
| 170 | 44:13+8 class |
| 171 | 44:22+3 type |
| 172 | 44:26+5 number |
| 173 | 44:33+13 comment |
| 174 | 46:0+1 keyword |
| 175 | 46:2+3 number |
| 176 | 46:6+3 type |
| 177 | 46:10+1 operator |
| 178 | 46:12+2 number |
| 179 | 46:15+3 type |
| 180 | 47:0+1 keyword |
| 181 | 47:2+3 number |
| 182 | 47:6+3 type |
| 183 | 47:10+1 operator |
| 184 | 47:12+2 number |
| 185 | 47:15+3 type |
| 186 | 47:20+8 comment |
| 187 | 49:0+12 keyword |
| 188 | 49:13+1 property |
| 189 | 50:0+12 keyword |
| 190 | 50:13+1 property |
| 191 | 50:16+14 comment |
| 192 | 52:0+7 keyword |
| 193 | 52:8+11 string |
| 194 | 53:0+7 keyword |
| 195 | 53:8+11 string |
| 196 | 53:21+14 comment |
| 197 | 55:0+9 keyword |
| 198 | 55:10+3 type |
| 199 | 56:0+9 keyword |
| 200 | 56:10+3 type |
| 201 | 56:15+16 comment |
| 202 | 58:0+9 keyword |
| 203 | 59:9+3 type |
| 204 | 59:13+14 number |
| 205 | 60:0+9 keyword |
| 206 | 60:15+20 comment |
| 207 | 61:9+3 type |
| 208 | 61:13+14 number |
| 209 | 63:0+9 keyword |
| 210 | 63:10+8 number |
| 211 | 63:19+3 type |
| 212 | 64:0+9 keyword |
| 213 | 64:10+8 number |
| 214 | 64:19+3 type |
| 215 | 64:24+23 comment |
| 216 | 65:0+9 keyword |
| 217 | 66:9+8 number |
| 218 | 66:18+3 type |
| 219 | 67:0+9 keyword |
| 220 | 67:15+20 comment |
| 221 | 68:9+8 number |
| 222 | 68:18+3 type |