Should static be a builtin and not keyword?


I was working with source kit and I was very surprised to find out that static is a “source.lang.swift.syntaxtype.keyword”. Is this necessary? From the surface it looks like it ended up a keyword by accident.

I was working on swiftlint rule but static is getting hard to parse with sourcekit (even on 4.1)

  1. Can static be reported as an attribute even though it is implemented as a keyword? Or does this change require changing the parse/compiler?
  2. Can contextual keywords be reported as their actual context and not their intrinsic kind?
    For example: class is a keyword, but sometimes it is used as a modifier. Can it be reported as a modifier when it is functioning as a modifier?


Related bug: