DefDWIM.mesa
Mike Spreitzer October 21, 1986 11:21:54 pm PDT
DIRECTORY HashTable, Rope, TextNode;
DefDWIM: CEDAR DEFINITIONS = {
ROPE: TYPE = Rope.ROPE;
Location: TYPE = TextNode.Location;
FindDef: Finder;
Determines the language used and uses the Finder for that language.
Finder: TYPE = PROC [subjectRope: ROPE, from: Place, deep, verbose: BOOL, interrupt: REF BOOLNIL] RETURNS [fp: FoundPlace];
If verbose, pacifiers will be printed in the MessageWindow.
If interrupt # NIL and interrupt^, then Failure is raised.
Raises Failure[..] if can't find.
Raises Failure[noplace, ..] if parse error.
Place: TYPE = RECORD [fileName: ROPE, loc: Location, searchOrder: SearchOrder];
noplace: Place = [NIL, [NIL, -1958], bkwdThenFwd];
SearchOrder: TYPE = {fwdThenBkwd, bkwdThenFwd, fromStart};
FoundPlace: TYPE = RECORD [where: Place, nameEnd: Location];
The name occurs in the definition at chars [where.loc .. nameEnd].
Failure: ERROR [where: Place, why: ROPE];
Register: PROC [languageTest: LanguageTest, finder: Finder];
LanguageTest: TYPE = PROC [Place] RETURNS [BOOL];
}.