I'd prefer you detected this during semantic, not parsing.  Otherwise code inside `version(none)` etc will generate messages.