Lexer and optional arguments
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Mon Apr 18 17:46:46 UTC 2022
Le 18/03/2022 à 18:45, Daniel a écrit :
> Is it possible to have optional arguments read with Lexer? I imagine
> something like:
>
> Command <Parameter1> [<Parameter2>]
>
> So Parameter1 is necessary but Parameter2 is optional. The Lexer would
> only look on the same line for an optional parameter.
Going back to old mails...
What is possible is to read one line with eatLine() and then parse it,
possibly with the lexer itself.
Or do something like in Layout::readAlignPossible.
JMarc
More information about the lyx-devel
mailing list