diff options
Diffstat (limited to 'web/noweb/src/icon/icondefs.nw')
-rw-r--r-- | web/noweb/src/icon/icondefs.nw | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/web/noweb/src/icon/icondefs.nw b/web/noweb/src/icon/icondefs.nw new file mode 100644 index 0000000000..f843011489 --- /dev/null +++ b/web/noweb/src/icon/icondefs.nw @@ -0,0 +1,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 +@ |