This package provides the following libraries (via ocamlobjinfo):
Vendored_easy_formatEasy_format: indentation made easy.
Vendored_cmdlinerDeclarative definition of command line interfaces.
Reason_config* Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree.
Reason_toolchain* Provides a simple interface to the most common parsing entrypoints required * by editor/IDE toolchains, preprocessors, and pretty printers. * * The form of this entrypoint includes more than what the standard OCaml * toolchain (oprof/ocamldoc) expects, but is still compatible. * *
interface_with_commentsincludes * additional information (about comments) suitable for building pretty * printers, editor, IDE and VCS integration. * * The comments include the full text of the comment (typically in between the * "(*" and the "*)", as well as location information for that comment. * * WARNING: The "end" location is one greater than the actual final position! * (for both
commentLoc). * * Currently, the location information for comments is of the form: * * (associatedTextLoc) * * But we should quickly change it to be of the form: * * (associatedTextLoc, commentLoc) * * Where the
commentLocis the actual original location of the comment, * and the
associatedTextLocrecords the location in the file that the * comment is attached to. If
commentLocare the * same, then the comment is "free floating" in that it only attaches to itself. * The
Reasonpretty printer will try its best to interleave those comments * in the containing list etc. But if
associatedTextLocexpands beyond * the
commentLocit means the comment and the AST that is captured by * the
associatedTextLocare related - where "related" is something * this
reason_toolchaindecides (but in short it handles "end of line * comments"). Various pretty printers can decide how to preserve this * relatedness. Ideally, it would preserve end of line comments, but in the * short term, it might merely use that relatedness to correctly attach * end of line comments to the "top" of the AST node. * * let lst =
* *; (* Comment *) * ----commentLoc----- * ---associatedTextLoc---- * * * Ideally that would be formatted as: * * let lst =
* *; (* Comment *) * * Or: * * let lst =
associatedTextLocto at least * correctly attach the comment to the correct node, even if not "end of line". * * (* Comment *) * let lst =