[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font Locking issue: Need help/advice
From: |
Serghei |
Subject: |
Re: Font Locking issue: Need help/advice |
Date: |
Fri, 03 Apr 2020 22:20:31 +0000 |
Hello Stephen,
> > 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).
In this case users will have to run an external process, right?
This is a little worrying for me. I would prefer to use the
built-in functionality for as long as possible. Partly due to the
fact that users are reluctant (and not always successful) installs
new software.
> > 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.
Of course, any LR(k) parser can handle this. But what about SMIE?
Won't it be more organic?
> I did not try to answer these, since my real answer is "use wisi".
In any case, thanks for the answer, I will definitely try this
because I enjoy studying things like scanners, parsers, grammars,
semantics and so on.
--
Serghei