Skip to content

A library for reordering expressions in a syntax tree generically according to operator associativity and precedence.

License

Notifications You must be signed in to change notification settings

1Computer1/reorder-expression

Repository files navigation

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.

About

A library for reordering expressions in a syntax tree generically according to operator associativity and precedence.

Resources

License

Stars

Watchers

Forks

Packages

No packages published