#410 line continuation character

open
nobody
Edit mode (23)
7
2013-12-09
2011-10-28
Gergeo Letay
No

Writing a bunch of modes for different simulators I found that for tcl-like languages jedit is seriously missing a line continuation character.
For native tcl commands typically look like:
command opt_1 opt_2 ... arg_1 arg_2

From highlighting point of view, it would make sens to give each group of command, options opt_x and arguments arg_x different colors.
Using a KEYWORD list straight forward fails, because some commands are equal to options from other commands, e.g. format can appear as an option for clock, global as option for interp, set/unset as option for array, join as option for file...
No problem, you would think, just use an EOL_SPAN DELEGATE ... to get the options for each command nicely separated in a rule.
The approach is fine, BUT tcl allows line continuation if the last none-whitespace character is a backslash. Hence we have situations like:
command opt_1 \ opt_2 ... \ arg_1 arg_2

So I would suggest to add a rule property tag LineContinuationChar. if this character appears as the last none-white space char on a line, the following line is appended to the current line. And, all lines joined together with a LineContinuationChar are infact handled as a single line in all mode tags.

Discussion

  • Gergeo Letay
    Gergeo Letay
    2013-11-12

    a solution would be really highly appreciated.
    as reward this feature would allow me to provide the community with a more context sensitive tcl mode.

     
  • Gergeo Letay
    Gergeo Letay
    2013-11-12

    • priority: 5 --> 7
     
  • Dale Anson
    Dale Anson
    2013-11-12

    I have the same problem with continuation lines in java properties files. Good to see there is more interest beyond properties files, I'll see if I can find time to work on this.

     
  • Gergeo Letay
    Gergeo Letay
    2013-11-12

    in case I can be of any further help, testing, testcases... let me know.