hledger-parser
v2.3.0
Published
A parser for hledger journal files based on Chevrotain
Downloads
12
Readme
hledger-parser
A parser for hledger journal files based on Chevrotain.
Grammar
Installation
npm install hledger-parser
Usage
import { parseLedgerToCooked } from 'hledger-parser';
const parseResult = parseLedgerToCooked(sourceCode);
console.log(`Lexing errors: ${parseResult.lexErrors.length}`);
console.log(`Parsing errors: ${parseResult.parseErrors.length}`);
console.log('Result:', parseResult.cookedJournal);
// Output:
// => Lexing errors: 0
// => Parsing errors: 0
// => Result: {
// => transactions: [
// => {
// => date: [Object],
// => status: 'unmarked',
// => description: 'Transaction',
// => postings: [Array],
// => tags: []
// => }
// => ],
// => accounts: [],
// => prices: []
// => }
Contributors
- Tristan Jones (@jonestristand), Author
- Daryl G. Wright (@darylwright), Lead Maintainer
Contributing
Contributions, issues and feature requests are welcome!Feel free to check the issues page. You can also take a look at the contributing guide.
Project roadmap
Please see the roadmap for project status and a list of features to be implemented.
Note
This is a detached fork of the original
hledger-parser
, and is in active development.
Special thanks goes out to @jonestristand for all the initial work he put into this project!
Show your support
Give a ⭐️ if this project helped you!
License
Copyright © 2022 Tristan Jones [email protected]. Copyright © 2024 Daryl G. Wright [email protected]. This project is MIT licensed.