Refactoring parser

- put all used strings in one place to have it easier to track
- don't use `$` for shortcuts, it's a detail not interesting to a
  user; now names must not clash (which is a good idea anyways)
- Added two more shortcuts `conc` and `corr`
This commit is contained in:
Eike Kettner
2021-03-08 22:46:40 +01:00
parent e681ffa96f
commit 77a87782b7
14 changed files with 183 additions and 79 deletions

View File

@ -140,16 +140,16 @@ render q =
"folder.id" ++ attrMatch m ++ quoteStr id
CorrOrgId m id ->
"correspondent.org.id" ++ attrMatch m ++ quoteStr id
"corr.org.id" ++ attrMatch m ++ quoteStr id
CorrPersId m id ->
"correspondent.person.id" ++ attrMatch m ++ quoteStr id
"corr.pers.id" ++ attrMatch m ++ quoteStr id
ConcPersId m id ->
"concerning.person.id" ++ attrMatch m ++ quoteStr id
"conc.pers.id" ++ attrMatch m ++ quoteStr id
ConcEquipId m id ->
"concerning.equip.id" ++ attrMatch m ++ quoteStr id
"conc.equip.id" ++ attrMatch m ++ quoteStr id
CustomField m kv ->
"f:" ++ kv.field ++ attrMatch m ++ quoteStr kv.value