Skip to content

Commit

Permalink
Pre-release 0.13.2: Patching grammar for v0.13.1 (#1232)
Browse files Browse the repository at this point in the history
* Updating grammar

* Removing debug contract
  • Loading branch information
troelsfr committed May 19, 2023
1 parent bc7c940 commit 24bfbbe
Show file tree
Hide file tree
Showing 9 changed files with 293 additions and 267 deletions.
528 changes: 273 additions & 255 deletions src/base/ParserFaults.messages

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/base/ScillaParser.mly
Expand Up @@ -233,6 +233,14 @@ t_map_value :
{ (* We only allow targs when the type is surrounded by parentheses *)
t }
| vt = address_typ; { vt }
| t = t_map_value_allow_targs_deprecated { t }

t_map_value_allow_targs_deprecated :
| d = scid; targs = nonempty_list(t_map_value_args)
{
match targs with
| [] -> to_type d (toLoc $startpos(d))
| _ -> ADT (SIdentifier.mk_id d (toLoc $startpos(d)), targs) }

t_map_value_allow_targs :
| d = scid; targs = nonempty_list(t_map_value_args)
Expand Down
Expand Up @@ -2,7 +2,7 @@
"errors": [
{
"error_message":
"Invalid type or pattern. If this is a type, then this is likely due to an illegal map value type. If this is a pattern-match, then it is likely due to a misplaced or missing double arrow ('=>').\n",
"In this match expression, following the pattern the parser expects an arrow (e.g. '=>').\n",
"start_location": {
"file":
"base/parser/bad/stmts_t-match-spid-with-bar-cid-cid-with.scilla",
Expand Down
Expand Up @@ -2,11 +2,11 @@
"errors": [
{
"error_message":
"This type annotation is not closed properly, or is missing parentheses to group the types, or has a missing or misplaced '='.\n",
"This is an invalid map type, the map value type is likely incorrect. The map type must be a storable type, i.e., a base type, a valid ADT, or a map type.\n",
"start_location": {
"file": "base/parser/bad/type_t-map-cid-cid-cid-underscore.scilla",
"line": 6,
"column": 32
"column": 37
},
"end_location": { "file": "", "line": 0, "column": 0 }
}
Expand Down
Expand Up @@ -2,12 +2,12 @@
"errors": [
{
"error_message":
"This type annotation is not closed properly, or is missing parentheses to group the types, or has a missing or misplaced '='.\n",
"This map type likely has an invalid map value type.\n",
"start_location": {
"file":
"base/parser/bad/type_t-map-cid-cid-lparen-cid-underscore.scilla",
"line": 5,
"column": 29
"column": 42
},
"end_location": { "file": "", "line": 0, "column": 0 }
}
Expand Down
Expand Up @@ -2,11 +2,11 @@
"errors": [
{
"error_message":
"This type annotation is not closed properly, or is missing parentheses to group the types, or has a missing or misplaced '='.\n",
"This is an invalid map type, the map value type is likely incorrect, possibly because of an unclosed parenthesis. The map type must be a storable type, i.e., a base type, a valid ADT, or a map type.\n",
"start_location": {
"file": "base/parser/bad/type_t-map-cid-cid-lparen-with.scilla",
"line": 5,
"column": 29
"column": 35
},
"end_location": { "file": "", "line": 0, "column": 0 }
}
Expand Down
Expand Up @@ -2,12 +2,12 @@
"errors": [
{
"error_message":
"This type annotation is not closed properly, or is missing parentheses to group the types, or has a missing or misplaced '='.\n",
"This map type likely has an invalid map value type.\n",
"start_location": {
"file":
"base/parser/bad/type_t-map-cid-cid-map-cid-underscore.scilla",
"line": 5,
"column": 31
"column": 46
},
"end_location": { "file": "", "line": 0, "column": 0 }
}
Expand Down
Expand Up @@ -2,11 +2,11 @@
"errors": [
{
"error_message":
"This type annotation is not closed properly, or is missing parentheses to group the types, or has a missing or misplaced '='.\n",
"This is an invalid map type, the map value type is likely incorrect. The map type must be a storable type, i.e., a base type, a valid ADT, or a map type.\n",
"start_location": {
"file": "base/parser/bad/type_t-map-cid-cid-map-with.scilla",
"line": 6,
"column": 31
"column": 38
},
"end_location": { "file": "", "line": 0, "column": 0 }
}
Expand Down
Expand Up @@ -2,7 +2,7 @@
"errors": [
{
"error_message":
"This is an invalid map type, the map value type is likely incorrect. The map type must be a storable type, i.e., a base type, a valid ADT, or a map type.\n",
"Invalid type or pattern. If this is a type, then this is likely due to an illegal map value type. If this is a pattern-match, then it is likely due to a misplaced or missing double arrow ('=>').\n",
"start_location": {
"file":
"base/parser/bad/type_t-map-cid-lparen-map-cid-cid-type.scilla",
Expand Down

0 comments on commit 24bfbbe

Please sign in to comment.