Merge branch 'bugfix/doc-declaration-constant' into 'dev'

bugfix/doc declaration constant

See merge request ligolang/ligo!367
This commit is contained in:
Rémi Lesenechal 2020-01-29 18:34:05 +00:00
commit 61e293da64
2 changed files with 11 additions and 2 deletions

View File

@ -11,8 +11,13 @@ and type_expression = {
} }
and declaration = and declaration =
| Declaration_type of (type_variable * type_expression) | Declaration_type of (type_variable * type_expression)
(* A Declaration_constant is described by
* a name
* an optional type annotation
* a boolean indicating whether it should be inlined
* an expression *)
| Declaration_constant of (expression_variable * type_expression option * inline * expression) | Declaration_constant of (expression_variable * type_expression option * inline * expression)
(* | Macro_declaration of macro_declaration *)
and expr = expression and expr = expression

View File

@ -8,8 +8,12 @@ type program = declaration Location.wrap list
and inline = bool and inline = bool
and declaration = and declaration =
(* A Declaration_constant is described by
* a name + a type-annotated expression
* a boolean indicating whether it should be inlined
* the environment before the declaration (the original environment)
* the environment after the declaration (i.e. with that new declaration added to the original environment). *)
| Declaration_constant of (named_expression * inline * (full_environment * full_environment)) | Declaration_constant of (named_expression * inline * (full_environment * full_environment))
(* | Macro_declaration of macro_declaration *)
and environment_element_definition = and environment_element_definition =
| ED_binder | ED_binder