summaryrefslogtreecommitdiff
path: root/www/dev_guide/parserInstructions.rst
blob: 805df7c79a5b0b15f6791f3d36f5e9152a84649c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Directives: Parser Instructions
===============================

(parserInstructions)

#breakpoint
-----------

(parserInstructions.breakpoint)

The template:

::

    Text before breakpoint.
    #breakpoint
    Text after breakpoint.
    #raise RuntimeError

The output:

::

    Text before breakpoint.

The generated code:

::

    write('Text before breakpoint.\n')

Nothing after the breakpoint was compiled.

#compiler
---------

(parserInstructions.compiler)

The template:

::

    // Not a comment
    #compiler commentStartToken = '//'
    // A comment
    #compiler reset
    // Not a comment

The output:

::

    // Not a comment
    // Not a comment

The generated code:

::

    write('// Not a comment\n')
    #  A comment
    write('// Not a comment\n')

So this didn't affect the generated program, it just affected how
the template definition was read.