Stack manipulation #647
flying-sheep
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For my reStructuredText project, I’d like to generalize a syntax construct called directive
Both arguments and blocks are either reStructuredText or something else, depending on the directive. E.g. in the following case both argument and the block are plain text (dedent the block and done):
This directive on the other hand has no arguments and a rST-formatted block:
My question:
I store the indentation in the stack. Do I have to copy and trim the text to be able to parse it, or is there a way to modify a parser’s stack before letting it do its thing?
Beta Was this translation helpful? Give feedback.
All reactions