Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.modlib.memo.parser¶
See introduction in memo : The memo parser.
TODO:
the auto-completer might insert the full text into the editor after the pattern. The user can then decide whether to leave it or not.
The memo commands might also be defined as suggesters with a trigger of type “[ticket “. Note that in that case we need to add a new attribute “suffix”, which would be empty for # and @ but “]” for memo commands.
Functions
|
Classes
|
The memo parser. |
|
Holds the configuration for the behaviour of a given "trigger". |
- class lino.modlib.memo.parser.Parser(**context)¶
Bases:
object
The memo parser.
- get_referred_objects(text)¶
Yield all database objects referred in the given text using a suggester.
- parse(src, ar=None, context=None, mentions=None)¶
Parse the given string src, replacing memo commands by their result.
ar is the action request asking to parse. User permissions and front-end renderer of this request apply.
context is a dict of variables to make available when parsing expressions in safe mode.
If mentions is specified, it should be a
set
to collect mentioned database objects.