Skip to content

Commit 2d142cb

Browse files
authored
Merge pull request #1421 from informalsystems/gabriela/empty-tuple-type-parsing
Parse the empty tuple type
2 parents b7e115b + 1c5d42e commit 2d142cb

10 files changed

+791
-709
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Deprecated
1313
### Removed
1414
### Fixed
15+
16+
- Fix a problem where empty tuples were not parsed as valid types, only as
17+
values (#1421).
18+
1519
### Security
1620

1721
## v0.19.1 -- 2024-04-01

quint/src/generated/Quint.g4

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* 2. Make it expressive enough to capture all of the TLA logic.
77
*
88
* @author: Igor Konnov, Shon Feder, Gabriela Moreira, Jure Kukovec, Thomas Pani
9-
* Informal Systems, 2021-2023
9+
* Informal Systems, 2021-2024
1010
*/
1111
grammar Quint;
1212

@@ -119,6 +119,8 @@ type
119119
| SET '[' type ']' # typeSet
120120
// TODO: replace List with general type application
121121
| LIST '[' type ']' # typeList
122+
// Parse tuples of size 0 or 2+, but not 1. (int) should be parsed as int.
123+
| '(' ')' # typeUnit
122124
| '(' type ',' type (',' type)* ','? ')' # typeTuple
123125
| '{' row? '}' # typeRec
124126
| 'int' # typeInt

quint/src/generated/Quint.interp

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quint/src/generated/QuintListener.ts

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)