Euphoria Ticket #710: syncolor.e does not highlight ` properly

Details

Type: Bug Report Severity: Normal Category: Library Routine
Assigned To: mattlewis Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone: 4.1.0

1. Comment by mattlewis Feb 26, 2013

I'm not sure what this example shows. Does anyone have an idea of what this bug actually is?

2. Comment by jimcbrown Feb 26, 2013

I think the idea is that syntax coloring should be multi-line.

E.g. when starting a quote with the backtick or triple double-quotes, if the string starts on the same line, then the text on the first line is coloured green.

However, the lines after the first are coloured normally (black with blue for keywords, etc) even though they are part of a string.

Finally, if the end of a multiline quote has text before the end quote and text after the end quote (say in a comment perhaps), then the text that's part of the string before the quote is incorrectly coloured normally, but the text that comes after the end of the string is coloured as if it was part of a new string (which it isn't).

Here's something which better demonstrates the problem:

with trace 
trace(1) 
sequence help_message = 
`You will be presented with a sequence of %d digits randomized.                 You can reverse the first X digits by entering the position number 

aaat the play prompt. The goal is to sort the list in the fewest number 
of mo`-- test ves. 

/* lol 

lol 
lol */ 

We seem to have a similar issue with multi-line comments.

3. Comment by mattlewis Feb 26, 2013

Oh! So...is this a library issue, or a trace / interpreter issue?

I hadn't even thought about the interactive trace screen. This sounds like a tokenizing problem. Hmm...we have a syncolor.e in include/euphoria and in source, which makes this more confusing.

I agree that it would be nice to properly color the tracing lines based on multi-line constructs.

4. Comment by jimcbrown Feb 27, 2013

It's a library issue. ed.ex has the same issues that the trace screen has.

source/syncolor.e just piggybacks on include/euphoria/syncolor.e - it acts as a bridge between it and be_syncolor.c (and is new to 4.1) (The nice thing about 4.1 is that all the syncolor stuff is unified.)

5. Comment by mattlewis Mar 01, 2013

See: hg:euphoria/rev/f8efa89cce11

changeset: 6013:f8efa89cce11 tag: tip user: Matt Lewis date: Fri Mar 01 11:30:16 2013 -0500 files: bin/ed.ex docs/release/4.1.0.txt include/euphoria/symstruct.e include/euphoria/syncolor.e include/euphoria/tokenize.e source/backend.e source/be_rterror.c source/be_syncolor.c source/be_syncolor.h source/execute.h source/syncolor.e description:

  • tokenizing / syntax coloring support multi-line strings and comments
  • trace screen updated for multiline constructs
  • ed.ex updated for multiline constructs
  • fixes ticket 710

6. Comment by mattlewis Mar 13, 2013

See: hg:euphoria/rev/869149b71dda

changeset: 6037:869149b71dda parent: 6029:11d91d709ee0 user: Matt Lewis date: Tue Mar 12 15:06:54 2013 -0400 files: include/euphoria/tokenize.e description:

  • fix multi-line comment to prevent duplication of first character on a new line
  • ticket 710

Search



Quick Links

User menu

Not signed in.

Misc Menu