Skip to content

Fixed pretty-printing of JsLIGO annotations (attributes) when they have no arguments.

Christian Rinderknecht requested to merge rinderknecht@print_js_attributes into dev

Motivation and Context

JsLIGO attributes (a.k.a. annotations) were always pretty-printed (formatted) in comments. Those without arguments should be printed without a comment, like so

  const increment = (delta: int, store: storage): ret =>
    [list([]), store + delta];


The function pp_attribute in src/passes/02-jsligo/Pretty was corrected to detect those predefined, constant attributes.


  • compiler
  • website
  • webide
  • vscode-plugin
  • debugger

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)


Predefined, constant JsLIGO annotations, like @entry, are now formatted outside of a line comment.


  • If a new syntax has been introduced, put a message on slack ligo-lsp
  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).

Merge request reports