Restrict Decl Nesting. #3394
Labels
kind:enhancement
a desirable new feature, option, or behavior
priority:critical
blocking multiple users from getting things done
Milestone
The parser should check for illegal nesting of decls, such as a generic nested inside a generic, or a
import
nesting inside a function.The solution is to declare a table of allowed decls for each decl, and perform that check systematically, e.g.
For now, we can allow a fallback case that if a decl type does not have an entry in
kAllowedChildNodeTypes
, then it is allowed anywhere.The text was updated successfully, but these errors were encountered: