[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font Locking issue: Need help/advice
From: |
Stephen Leake |
Subject: |
Re: Font Locking issue: Need help/advice |
Date: |
Fri, 03 Apr 2020 10:27:12 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
Serghei Iakovlev <address@hidden> writes:
> 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.
The ELPA package wisi can help here (I'm the author).
> 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.
This is the kind of thing that made move away from regexp to a true
parser for ada-mode, which eventually led to the current wisi package.
> 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 };
This definitely would be easier with a parser.
> - 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?
I did not try to answer these, since my real answer is "use wisi".
> [2]: https://zephir-lang.com
I don't see a grammar there, which is the first step in using wisi. Is
there a grammar available somewhere? or one for a similar language, that
would be easy to modify?
--
-- Stephe