Hello, I am creating a new mode called zephir-mode [1]. The main goals of this mode is to provide syntax highlighting, indentation, movement, navigation support and Imenu for Zephir [2] language. Currently I'm working on fontification and faced a strange behavior. Please see animated GIF I attached to this email to demonstrate the issue. The code responsible for fontification demonstrated in GIF is located here [3]. I used GNU Emacs 27.0.90 to demonstrate and test this issue. I'd like to provide the patterns I'm trying to catch: protected foo; protected static foo; public bar = 1; private baz = []; private baz = [] { set }; protectd foo { get }; public static bar = 42; private static baz = 13 { get }; private baz = 13 { get, set, toString }; However, my tests passes without any problem [4]. So I need help here. Actually I have few questions related to this issue: - This is my first experience with complex object fontification and I suspect that I have chosen an insufficiently effective or concise approach/tool/API. Could someone take a look over used approach and provide a small feedback about the overall strategy? - What happens on the GIF? How I can fix this? How to avoid similar in the future? - In fact, I would like to be able to independently receive the answer to the question "Why did this happen?" so I'm interesting on debugging practices. How to debug similar issues? [1]: https://github.com/zephir-lang/zephir-mode [2]: https://zephir-lang.com [3]: https://github.com/zephir-lang/zephir-mode/blob/0.6.0/zephir-mode.el#L850-L901 [4]: https://github.com/zephir-lang/zephir-mode/blob/0.6.0/test/test-zephir-mode-font-lock.el#L239-L266 -- Serghei