• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
3<article id="source_mode_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
4 xmlns:xi="http://www.w3.org/2001/XInclude">
5  <title>Source Mode Test</title>
6  <informaltable frame="all">
7    <tgroup cols="2">
8      <tbody>
9        <row>
10          <entry>
11<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
12          </entry>
13          <entry>
14<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
15          </entry>
16        </row>
17      </tbody>
18    </tgroup>
19  </informaltable>
20<programlisting>Plain text...</programlisting>
21  <para>
22    <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
23    role="special">()</phrase> <phrase role="special">{}</phrase></code> but <code>plain
24    text</code>.
25  </para>
26  <itemizedlist>
27    <listitem>
28      <simpara>
29        <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
30        role="special">()</phrase> <phrase role="special">{}</phrase></code>
31      </simpara>
32    </listitem>
33    <listitem>
34      <simpara>
35        <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
36        role="special">()</phrase> <phrase role="special">{}</phrase></code>
37      </simpara>
38    </listitem>
39    <listitem>
40      <simpara>
41        <code>int main() {}</code>
42      </simpara>
43    </listitem>
44  </itemizedlist>
45  <para>
46    <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
47    role="special">()</phrase> <phrase role="special">{}</phrase></code> and <code><phrase
48    role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
49    <phrase role="special">{}</phrase></code> should both be C++ highlighted. <code>int
50    main() {}</code> shouldn't be, but <code><phrase role="keyword">int</phrase>
51    <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase
52    role="special">{}</phrase></code> should.
53  </para>
54  <para>
55    <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
56    role="special">()</phrase> <phrase role="special">{}</phrase></code>. Not highlighted:
57    <code>int main() {}</code>.
58  </para>
59  <section id="source_mode_test.cpp">
60    <title><link linkend="source_mode_test.cpp">C++ section</link></title>
61<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
62  </section>
63</article>
64