diff --git a/src/parser.rs b/src/parser.rs index 34d0f4d..10af002 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -879,7 +879,8 @@ impl Parser { Ok(effects) } - /// Parse behavioral properties: is pure, is total, is idempotent, etc. + /// Parse behavioral properties: is pure, total, idempotent, etc. + /// Supports: `is pure`, `is pure is total`, `is pure, total`, `is pure, is total` fn parse_behavioral_properties(&mut self) -> Result, ParseError> { let mut properties = Vec::new(); @@ -901,9 +902,15 @@ impl Parser { let property = self.parse_single_property()?; properties.push(property); - // Optional comma for multiple properties: is pure, is total - if self.check(TokenKind::Comma) { - self.advance(); + // After first property, allow comma-separated list without repeating 'is' + while self.check(TokenKind::Comma) { + self.advance(); // consume comma + // Allow optional 'is' after comma: `is pure, is total` or `is pure, total` + if self.check(TokenKind::Is) { + self.advance(); + } + let property = self.parse_single_property()?; + properties.push(property); } }