-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line continuation in curly braces #110
Comments
Another way the difference manifests:
|
If you're interested, I've just pushed a number of tests for Tcl 8-compatible handling of line continuations to Picol's repo. |
Thanks for the report. I was aware of this incompatibility with Tcl but I didn't see it as a significant feature. (i.e. I've never needed it). I would be happy to hear specific issues with this missing feature aside from simply incompatibility. |
The issues I have seen come down to long string literals with meaningful whitespace being corrupted in code that otherwise works in Jim. The most common has probably been help messages displayed incorrectly when written like the one below. puts stderr {Lorem ipsum dolor sit amet, consectetur\
adipiscing elit. Aenean non pharetra\
metus, vitae tristique sem. Praesent\
at sapien non nibh suscipit ultrices.} Those are only an annoyance. More important, though far less common, have been problems with multiline regular expressions and document templates. For example, if {[regexp {a very long regular expression split on a word\
boundary} $foo]} ... set template {
...
<deeply>
<nested>
<tags foo="a" bar="b" \
baz="c">
%5$s
</tags>
...
} |
Here, is a fix: https://gist.github.com/msteveb/bc468decd86293c185e498adff9a2199 But unfortunately it breaks line numbering:
I don't see any easy way around this. I prefer line numbering to be correct. |
Thanks for the patch! Yes, I agree it's a bad regression. So far I've spent a couple of hours trying to hack up a solution localized to just |
I wonder if this is also the root cause of the error I get whenever I break a long list of proc parameters into 2 lines, in version 0.79:
I run into that often, and it's annoying. I'm in the habit of doing it that way, from Tcl 8.x Just now I did find that removing the backslash makes it work:
Is that the same workaround y'all use? I wouldn't want any interp changes that break line numbering in stack dumps. The line numbering is one of THE MAJOR reasons I've adopted Jim across the board. Its absence in Tcl 8.x is simply ASTONISHING to me. |
I agree regarding line numbers and I wouldn't want to give it up for this feature. If anyone implements an elegant solution to this, I'm happy to consider it. In the meantime, yes I simply remove the backslashes. |
Jim does not process line continuations in curly braces, which causes incompatibility with Tcl 8 code.
The text was updated successfully, but these errors were encountered: