all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Font Locking issue: Need help/advice
@ 2020-04-03 12:29 Serghei Iakovlev
  2020-04-03 18:27 ` Stephen Leake
  2020-04-03 22:36 ` David Engster
  0 siblings, 2 replies; 7+ messages in thread
From: Serghei Iakovlev @ 2020-04-03 12:29 UTC (permalink / raw)
  To: GNU Emacs Developers

[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]

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


[-- Attachment #2: zephir-mode-font-lock-issue.gif --]
[-- Type: image/gif, Size: 500490 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-05 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03 12:29 Font Locking issue: Need help/advice Serghei Iakovlev
2020-04-03 18:27 ` Stephen Leake
2020-04-03 22:20   ` Serghei
2020-04-04  0:21     ` Stephen Leake
2020-04-03 22:36 ` David Engster
2020-04-03 23:48   ` Yuan Fu
2020-04-05 14:37   ` Serghei

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.