How to color words in codemirror with condition?

hello , this is my question on stackoverflow … can any body help ?