I'd prefer not to add a another pass through the tree, since this code is very performance-sensitive (runs on every keystroke). Couldn't this be done at the level of symbols, like most other semantic highlighting coloring?

How about comparing the symbol to the `apply/select/updateDynamic` symbol from compiler definitions? I think it would fit in `SymbolTests`.