Frontend.Canonicalize
Re-write ASTs to remove deprecated features and clean up extra parenthesis, etc
Flags to enable or disable certain kinds of canonicalization. NB: inline_includes
is controlled by the --canonicalize
argument to stanc, but it consumed by the pretty-printer, not this module.
val legacy : canonicalizer_settings
Equivalent to what --print-canonical
did before these settings were available
val none : canonicalizer_settings
val canonicalize_program :
Ast.typed_program ->
canonicalizer_settings ->
Ast.typed_program
"Canonicalize" the program by removing deprecations, adding or removing parenthesis and braces, etc.