blob: f843011489cc5138a48dc35cfc66571327a39ab1 (
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
|
\section{Finding Icon definitions}
<<*>>=
global showlocal
procedure main(args)
showlocal := !args == "-local"
go()
end
<<*>>=
procedure postpass(name, arg)
static kind, definers
initial { kind := "bogus"
definers := ["global"]
if \showlocal then every put(definers, "local" | "static")
}
case name of {
"begin" : arg ? kind := tab(upto(' ')|0)
"text" : if kind == "code" then arg ?
if =("procedure "|"record ") then {
tab(many(' '))
writedefn(tab(upto(' ()')))
} else if (tab(many(' ')) | "", =!definers, tab(many(' '))) then {
while (not any('#')) & writedefn(tab(upto(', #'))) do tab(many(', '))
if not any('#') then writedefn(tab(0))
}
}
return
end
procedure prepass(name, arg)
if name == "end" then writedefn(&null) # force newline
end
<<*>>=
procedure rcsinfo ()
return "$Id: icondefs.nw,v 1.18 2008/10/06 01:03:05 nr Exp nr $" ||
"$Name: v2_12 $"
end
@
|