* Objective-C highlighting rules.
*/
+require_state (c);
+
state c_ppline extends CHighlight
{
- BEGIN {
- require_state (c);
- }
/* Comments within a pre-processor line. */
/\/\*/ {
comment_face (true);
language_print ($0);
- call (c_comment);
+ call (c_ppline_comment);
comment_face (false);
}
/* Include line. */
call (c_ppline_tokensequence);
return;
}
+ /\\\\\n/ {
+ language_print ($0);
+ }
/\n/ {
language_print ($0);
return;
call (c_ppline_comments_strings_chars);
return;
}
+ /\\\\\n/ {
+ language_print ($0);
+ }
/\n/ {
language_print ($0);
return;
call (c_ppline_comments_strings_chars);
return;
}
+ /\\\\\n/ {
+ language_print ($0);
+ }
/\n/ {
language_print ($0);
return;
/\/\*/ {
comment_face (true);
language_print ($0);
- call (c_comment);
+ call (c_ppline_comment);
comment_face (false);
}
/* String constants. */
language_print ($0);
string_face (false);
}
+ /\\\\\n/ {
+ language_print ($0);
+ }
/\n/ {
language_print ($0);
return;
/\/\*/ {
comment_face (true);
language_print ($0);
- call (c_comment);
+ call (c_ppline_comment);
comment_face (false);
}
/* String constants. */
language_print ($0);
variable_name_face (false);
}
+ /\\\\\n/ {
+ language_print ($0);
+ }
+ /\n/ {
+ language_print ($0);
+ return;
+ }
+}
+
+/* Comments within pre-processor directives need escaped newlines. */
+state c_ppline_comment extends c_comment {
+ /\\\\\n/ {
+ language_print ($0);
+ }
/\n/ {
language_print ($0);
return;