@hackage / reorder-expression

Reorder expressions in a syntax tree according to operator fixities.

Latest0.1.0.3

About

Metadata

  • Last updated , by comp
  • License MIT
  • Maintained by: onecomputer00@gmail.com

  • Lottery factor: 1

Links

Installation

Tested Compilers

  1. 9.10.3
  2. 9.8.4
  3. 9.6.7
  4. 9.4.8
  5. 9.2.8

Readme

reorder-expression

License MIT Hackage

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.