https://github.com/1computer1/reorder-expression
A library for reordering expressions in a syntax tree generically according to operator associativity and precedence.
https://github.com/1computer1/reorder-expression
Last synced: 9 months ago
JSON representation
A library for reordering expressions in a syntax tree generically according to operator associativity and precedence.
- Host: GitHub
- URL: https://github.com/1computer1/reorder-expression
- Owner: 1Computer1
- License: mit
- Created: 2021-04-25T19:24:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-26T14:58:37.000Z (about 2 years ago)
- Last Synced: 2024-04-25T21:04:08.572Z (over 1 year ago)
- Language: Haskell
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# reorder-expression
[](./LICENSE)
[](https://hackage.haskell.org/package/reorder-expression)
A library for reordering expressions in a syntax tree generically according to operator associativity and precedence. This is useful for languages with custom operators which require reordering expressions after collecting their fixities.
Supports:
- Any syntax tree data type, e.g. source position-annotated ones.
- Postfix, prefix, and infix operators, with any arity.
- Left, right, and non-associative operators and precedence with doubles.
See documentation for an example.