fix: amount as parser rule

This commit is contained in:
Yarmo Mackenbach 2024-08-12 10:50:10 +02:00
parent dad77f64ec
commit 72737335de
No known key found for this signature in database
GPG key ID: 2B71CD64664999B6

View file

@ -13,12 +13,12 @@ line
plan
: PLAN_TOKEN TEXT
| PLAN_TOKEN TEXT AMOUNT
| PLAN_TOKEN TEXT amount
;
task
: TASK_TOKEN TEXT
| TASK_TOKEN TEXT AMOUNT
| TASK_TOKEN TEXT amount
;
subtask
@ -29,25 +29,29 @@ subtask
;
subtask_new
: SUBTASK_NEW_TOKEN TEXT AMOUNT?
: SUBTASK_NEW_TOKEN TEXT amount?
;
subtask_partial
: SUBTASK_PARTIAL_TOKEN TEXT AMOUNT?
: SUBTASK_PARTIAL_TOKEN TEXT amount?
;
subtask_complete
: SUBTASK_COMPLETE_TOKEN TEXT AMOUNT?
: SUBTASK_COMPLETE_TOKEN TEXT amount?
;
subtask_obsolete
: SUBTASK_OBSOLETE_TOKEN TEXT AMOUNT?
: SUBTASK_OBSOLETE_TOKEN TEXT amount?
;
comment
: TEXT
;
amount
: '{' INT '}'
;
PLAN_TOKEN
: '# '
;
@ -76,11 +80,11 @@ WS
: [ \r\n\t]+ -> skip
;
AMOUNT
: '{' INT+ '}'
INT
: DIGIT+
;
fragment INT
fragment DIGIT
: [0-9]
;