anilgkts / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Editor does not handle backslash at line end of comments #956

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using Arduino 1.0.1 and added some comments to a .h file to describe some 
constants. Some lines contained a backslash at the end. I was surprised that my 
software did not work correctly. It took me a long time to find out that the 
trailing backslash was the reason because in the case the next line also will 
be treated as comment. It would have been much easier for me to find this out 
if the syntax coloring would have shown the next line in "comment color", too.

Example:
unsigned char values[] = {
  45, 12, 56, // \
  45, 13, 57,
  45, 13, 58
};

will be treated as

unsigned char values[] = {
  45, 12, 56,
  45, 13, 58
};

by the compiler.

Original issue reported on code.google.com by meiklehm...@googlemail.com on 11 Jun 2012 at 10:01

GoogleCodeExporter commented 9 years ago
The syntax highlighter should definitely handle \ at the end of a line.  I 
probably don't have time to dig into that code, though.  Anyone interested in 
tackling this?

Original comment by dmel...@gmail.com on 17 Jul 2012 at 3:33