Skip to content
Snippets Groups Projects
Unverified Commit 0d2d8618 authored by youngcw's avatar youngcw Committed by GitHub
Browse files

Goals: fix broken parser (#1059)

parent 0baf4a09
No related branches found
No related tags found
No related merge requests found
// https://peggyjs.org
expr
= priority: priority? percent: percent _ of _ category: name
= priority: priority? _? percent: percent _ of _ category: name
{ return { type: 'percentage', percent: +percent, category, priority: +priority }}
/ priority: priority? amount: amount _ repeatEvery _ weeks: weekCount _ starting _ starting: date limit: limit?
/ priority: priority? _? amount: amount _ repeatEvery _ weeks: weekCount _ starting _ starting: date limit: limit?
{ return { type: 'week', amount, weeks, starting, limit, priority: +priority }}
/ priority: priority? amount: amount _ by _ month: month from: spendFrom? repeat: (_ repeatEvery _ repeat)?
/ priority: priority? _? amount: amount _ by _ month: month from: spendFrom? repeat: (_ repeatEvery _ repeat)?
{ return {
type: from ? 'spend' : 'by',
amount,
......@@ -12,11 +14,11 @@ expr
from,
priority: +priority
} }
/ priority: priority? monthly: amount limit: limit?
/ priority: priority? _? monthly: amount limit: limit?
{ return { type: 'simple', monthly, limit, priority: +priority } }
/ priority: priority? limit: limit
/ priority: priority? _? limit: limit
{ return { type: 'simple', limit , priority: +priority } }
/ priority: priority? schedule _ full:full? name: name
/ priority: priority? _? schedule _ full:full? name: name
{ return { type: 'schedule', name, priority: +priority, full } }
......
---
category: Bugfix
authors: [youngcw]
---
Goals: Undo change that broke some template parsing
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment