Difference between revisions of "Help:Token Coloring"
From wiki.visual-prolog.com
m (New page: You can automatically apply token coloring to code written in a large number of programming languages, notably Visual Prolog. ==Visual Prolog Token Coloring== If you write: <nowiki><vi...) |
(Other Languages) |
||
Line 29: | Line 29: | ||
==Other Languages== | ==Other Languages== | ||
If you write: | Other programming languages can be token colored using | ||
<nowiki><code language="XXXX"> ... </code></nowiki> | |||
where XXXX indicates a programming (see below for supported languages). | |||
If you for example write: | |||
<nowiki><code language="java">/** "ConcreteImplementor" 1/2 */ | <nowiki><code language="java">/** "ConcreteImplementor" 1/2 */ | ||
Line 46: | Line 52: | ||
} | } | ||
}</code> | }</code> | ||
==Supported Languages== | |||
<code language="list" /> | <code language="list" /> |
Revision as of 08:09, 27 August 2007
You can automatically apply token coloring to code written in a large number of programming languages, notably Visual Prolog.
Visual Prolog Token Coloring
If you write:
<vip>some Visual Prolog code</vip>
The code will be token colered according to Visual Prolog rules (more or less). For example:
<vip>predicates isMember : (Elem Value, Elem* List) determ. %@short Succeds is #Value is member of #List. %@end clauses isMember(V, [V|_L]) :- !. isMember(V, [_X|L]) :- isMember(V, L).</vip>
The result will look like this:
predicates isMember : (Elem Value, Elem* List) determ. %@short Succeds is #Value is member of #List. %@end clauses isMember(V, [V|_L]) :- !. isMember(V, [_X|L]) :- isMember(V, L).
Other Languages
Other programming languages can be token colored using
<code language="XXXX"> ... </code>
where XXXX indicates a programming (see below for supported languages).
If you for example write:
<code language="java">/** "ConcreteImplementor" 1/2 */ class DrawingAPI1 implements DrawingAPI { public void drawCircle(double x, double y, double radius) { System.out.printf("API1.circle at %f:%f radius %f\n", x, y, radius); } }</code>
The result will be like this:
/** "ConcreteImplementor" 1/2 */
class DrawingAPI1 implements DrawingAPI {
public void drawCircle(double x, double y, double radius) {
System.out.printf("API1.circle at %f:%f radius %f\n", x, y, radius);
}
}
Supported Languages