You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, DuckScript appears to lack any means to split up long lines. A simple \ before a newline probably is a good yet simple solution to the problem.
Describe The Solution You'd Like
At the end of lines, including a \ character should tell the parser to ignore the newline and continue parsing the command on the previous line.
@enderger thanks for the suggestion.
i made duckscript stupid simple on purpose, but i get your point that this might hurt readability for long lines.
let me think of something here....
We are aware that it is intentionally simple, and find that a strong quality. Looking into the source, it seems that there would need a modification to line splitting (the solution with the least code would be changing the delimiter, but that would require something like semicolons), perhaps using replace before splitting into lines (those followed by a space would be implicitly escaped).
@enderger i'm not worried about parsing. The technical issue is actually the parsed line metadata (such as a command line) that has which file and line number it came from). for that i'm not going to support the right line, only define it as the first line. i think its good enough but not as amazing as i would hope.
also since the next line would actually be not available, gotos would have to skip to next available line... this might happen already. need to check.
Feature Description
Currently, DuckScript appears to lack any means to split up long lines. A simple
\
before a newline probably is a good yet simple solution to the problem.Describe The Solution You'd Like
At the end of lines, including a \ character should tell the parser to ignore the newline and continue parsing the command on the previous line.
Code Sample
The text was updated successfully, but these errors were encountered: