On Wed, Jul 3, 2019 at 7:57 PM J. Gareth Moreton <gar...@moreton-family.com>
wrote:

> While I like the idea in principle, one thing that I'm a bit worried about
> is how whitespace is handled, like what counts for a leading or trailing
> space in the string when between lines, since Pascal parsers (and those for
> many other languages) traditionally, I believe, discard everything
> following the last non-whitespace character in a line.  Also, with the
> backtick suggestion, what should one do if they wish to include a control
> character (e.g. a linefeed) or the backtick character itself?
>

I've looked through the sources extensively (and started playing around
with a basic implementation, actually.) FPC doesn't care about anything
other than #13, #10 when it comes to terminating lines, currently.

For the backtick, it just needs to not intentionally error out on #13 and
#10, and instead continue until it hits another backtick.

As far as including the backtick itself, the rough version I have going
accepts it the same way a single-quote literal is currently accepted (which
is to say, if you want a single quote literal, you have to do four of them
in a row. Same applies to the backtick.)
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to