Closed tajmone closed 6 years ago
Hi Tristano,
your assumptions are correct, except Continuation
which is a character and no regular expression. If the preprocessort line ends with this character the mode just continues.
The preprocessor state is aware of comments or strings, as you have noticed in the PR comments.
Ciao André,
I've just realized that in the
template.lang
I created for the "extras
" folder I've forgot to cover thePreProcessor
element! (it slipped through! I thought I had them all covered...)Since I've already opened a pull request (PR #44) to update the template, it would be a right time to add the missing element; but I'll need to understand better how it works.
The documentation states:
And the example I've found (I think from Python) is:
How does this element actually work? Does the parser assume that from the
Prefix
match onward (until end of line) the Prefix and all that follows it is part of the PreProcessor element? (ie: like with single line comments)And is the
Continuation
meant to be a RegEx that, if matched, will carry on over the next line the PreProcessor element? ie: it can occur only at the end of the line?Sorry to bother you with this, but I've trouble coming to grips with this element. (haven't had a chance to use it so far!)