micro/runtime/syntax/ledger.yaml

15 lines
486 B
YAML
Raw Normal View History

2017-03-21 21:55:22 +03:00
filetype: ledger
detect:
filename: "(^|\\.|/)(ledger|ldgr|beancount|bnct)$"
2017-03-21 21:55:22 +03:00
rules:
- special: "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*"
- constant: "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}"
- statement: "^~ .*"
- identifier.var: "^= .*"
- identifier: "^[[:space:]]+(![[:space:]]+)?\\(?[A-Za-z ]+(:[A-Za-z ]+)*\\)?"
- identifier: "^[[:space:]]+(![[:space:]]+)?\\(?[A-Za-z_\\-]+(:[A-Za-z_\\-]+)*\\)?"
- symbol: "[*!]"
- comment: "^[[:space:]]*;.*"