diff --git a/src/protocol/ast.rs b/src/protocol/ast.rs index 468330bceee9955aaa86445979d345f962df61e9..63762b6dadd95850af6bb4b2325310725ccb67ea 100644 --- a/src/protocol/ast.rs +++ b/src/protocol/ast.rs @@ -372,6 +372,10 @@ pub enum ParserTypeVariant { Array, Input, Output, + // Tuple: expecting any number of elements. Note that the parser type can + // have one-valued tuples, these will be filtered out later during type + // checking. + Tuple(u32), // u32 = number of subsequent types // User-defined types PolymorphicArgument(DefinitionId, u32), // u32 = index into polymorphic variables Definition(DefinitionId, u32), // u32 = number of subsequent types in the type tree. @@ -391,7 +395,7 @@ impl ParserTypeVariant { 0, ArrayLike | InputOrOutput | Array | Input | Output => 1, - Definition(_, num) => *num as usize, + Definition(_, num) | Tuple(num) => *num as usize, } } }