From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Font Locking issue: Need help/advice
Date: Fri, 03 Apr 2020 10:27:12 -0800 [thread overview]
Message-ID: <86sghke873.fsf@stephe-leake.org> (raw)
In-Reply-To: <25fe76a8-025a-be67-8a28-3ac711f07766@protonmail.ch> (Serghei Iakovlev's message of "Fri, 03 Apr 2020 12:29:47 +0000")
Serghei Iakovlev <egrep@protonmail.ch> 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
next prev parent reply other threads:[~2020-04-03 18:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 12:29 Font Locking issue: Need help/advice Serghei Iakovlev
2020-04-03 18:27 ` Stephen Leake [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86sghke873.fsf@stephe-leake.org \
--to=stephen_leake@stephe-leake.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.