[ANN] OCaml syntax support added to astexplorer.net

OCaml syntax support has been added to astexplorer.net.

This will allow to inspect the parsed abstract syntax tree of any OCaml program that is syntactically valid. All OCaml languages (core, class, modules) are supported.

Variant arguments have been manually labelled in the resulting tree visualization, so even when there are optional types with value None, the output will include some information about what that parameter represents.

For example, Pexp_fun that has the parameters (Asttypes.arg_label, option(expression), pattern, expression) is represented like:


With astexplorer, one can generate links from specific programs using the “Snippet” menu, and share them with others or include in blog posts, etc. For example: https://astexplorer.net/#/gist/19f5b9e2aca6a1dd9c1bfaca16980db7/241f9d6f55fe6ec407b210dc013f23a0d362d71a

Please let me know any feedback you might have, or bugs you might encounter. Thanks! :slight_smile:


This is awesome. Thanks @jchavarri!