File: ok_auto_link.pas

package info (click to toggle)
pasdoc 0.16.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,572 kB
  • sloc: pascal: 28,894; javascript: 7,665; xml: 2,597; makefile: 523; sh: 417
file content (68 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download | duplicates (2)
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
68
{ @abstract(Auto-link tests.)

  Self name: ok_auto_link, simple identifiers Var1,
  qualified ident: ok_auto_link.Var1.

  Ident that can't be auto-linked: no_auto_link_to_me.
  Explicit link to ident that can't be auto-linked: @link(no_auto_link_to_me). }

unit ok_auto_link;

interface

const
  { @noAutoLinkHere }
  no_auto_link_to_me = 1;

type
  TMyClass = class
  { Common word used as identifier must be ignored when auto-linking 
    thanks to auto-link-exclude list:
    Little brown fox runs over a field }
    Field: Integer;
  end;

var
  { @definitionList(
      @itemLabel Test of auto-linking:
      @item(
        Self name is Var1, simple ident is TMyClass, qualified ident is
        TMyClass.Field.

        Ident that can't be auto-linked: no_auto_link_to_me.
        Explicit link to ident that can't be auto-linked: @link(no_auto_link_to_me).

        Note that auto-linking works also inside @@code:

        @code(
        Self name is Var1, simple ident is TMyClass, qualified ident is
        TMyClass.Field. )
      )

      @itemLabel Test of @@noAutoLink:
      @item(
        Things below should @italic(not) be converted to links:

        @noAutoLink(
          Self name is Var1, simple ident is TMyClass, qualified ident is
          TMyClass.Field.

          Ident that can't be auto-linked: no_auto_link_to_me.
          Explicit link to ident that can't be auto-linked: @link(no_auto_link_to_me).

          @noAutoLink(Simple ident once again TMyClass.)

          Inside @@code:

          @code(
          Self name is Var1, simple ident is TMyClass, qualified ident is
          TMyClass.Field.)
        )
      )
    )
  }
  Var1: Integer;

implementation

end.