Add automatic variable annotations inferring
Clarification and motivation
While running tezos-client
, notes are added automatically in some contexts (see: https://tezos.gitlab.io/008/michelson.html#automatic-variable-and-field-annotations-inferring). For example, after a SLICE
command, an @slice
annotation will be added.
However, in Morley, such annotations don't seem to be displayed. It would be nice to imitate such behavior.
For an example, run tezos-client typecheck script tezos_examples/opcodes/slice.tz -v
from the contracts
directory.
Note that Morley seems to have some support for this, but it doesn't work as intended, only adding such annotations in rare cases.
Acceptance criteria
Instructions that add variable annotations automatically (IF_NONE
, ITER
, SLICE
etc) are properly added and tests are created confirming that these work.
Bonus points if See !763 (merged).parameter
and storage
variable annotations are considered too.