[swift-evolution] Handling unknown cases in enums [RE: SE-0192]
clattner at nondot.org
Wed Jan 17 18:43:33 CST 2018
> On Jan 17, 2018, at 4:19 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>>> The parser has fairly general support for declmodifiers, and my proposal fits directly into that. The only extension is that ‘default’ isn’t a decl, and I don’t think we have a statement modifier yet. That said, we’ve always planned to have them when the need arose.
>> ‘case’ isn’t a decl in switches either. Nor is it a statement, the way things are modeled today.
> Bleah, sorry, I forgot that it is a statement at the moment. But I don't think it needs to be modeled as a statement attribute/modifier. A flag on CaseStmt is fine.
DeclModifiers are a syntax/parser thing, not a representational concept in the AST. Storing it as a bit would be fine, I’d also prefer that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution