Syntax highlighting (11)

1 Name: Anonymous : 2008-10-15 03:39 ID:PrIMT2jy [Del]

Something that has been on the list for aeons finally got implemented:

/* -*- c -*- */
#include <stdio.h>
int main(int argc, char **argv)
{
int n;
for (n = 0; n < 5; n++)
printf("dongs\n");
return 0;
}

This uses a real syntax parser (i.e., not the javascript crap that 4chan uses on /prog/), so you have to specify the language inside -*- markers for it to work, at least for now. Heuristics for common lanugages might be a future possibility.

2 Name: Anonymous : 2008-10-28 13:45 ID:VAtunbf6 [Del]

/* -*- lisp -*- */
(defun foo ()
(print "Penis"))

3 Name: Anonymous : 2008-10-28 16:43 ID:CgFXi2rq [Del]

>>2
I think you probably wanted to use a lisp comment there.

4 Post deleted by user.

5 Name: Anonymous : 2008-11-10 12:35 ID:iSglCZ0k [Del]

Who in the world uses lisp comments nowadays, you moron?
I want to ask him, "do you REALLY want to use lisp comments?"
I want to interrogate him. I want to interrogate him for roughly an hour.
Are you sure you don't just want to try saying "lisp comment"?

6 Name: Anonymous : 2008-11-10 20:07 ID:Heaven [Del]

# -*- perl -*-
>>5 =~ s/\s*comments?//g;

7 Name: LiteralKa !!Oa6IW4fJ : 2008-12-21 11:24 ID:Heaven [Del]

-- java --
echo test

8 Name: LiteralKa !!Oa6IW4fJ : 2008-12-21 11:25 ID:Heaven [Del]

-- c --
#include <stdio.h>
int main(int argc, char **argv)
{

int n;
for (n = 0; n < 5; n++)
printf("dongs\n");
return 0;

}

9 Name: LiteralKa !!Oa6IW4fJ : 2008-12-21 11:25 ID:KGKZLDDk [Del]

what the fuck

10 Name: Anonymous : 2008-12-21 14:39 ID:Heaven [Del]

Code works like Markdown or Wakabamark – indent by four spaces or a tab.

11 Name: LiteralKa !!Oa6IW4fJ : 2008-12-21 17:45 ID:KGKZLDDk [Del]

# -*- perl -*-
lol
Name: Link:
Spam trap (leave blank):