prettier.def
来自「一个Modula-2语言分析器」· DEF 代码 · 共 38 行
DEF
38 行
DEFINITION MODULE Prettier;
(* Pretty printing auxiliary functions for use with Modula-2 pretty printing
program generated by COCO from an attributed grammar
P.D. Terry, Rhodes University, 1995 *)
IMPORT FileIO;
VAR
results : FileIO.File;
PROCEDURE Append (Str : ARRAY OF CHAR);
(* Append String to output buffer *)
PROCEDURE IndentNextLine;
(* If output buffer has characters other than spaces, copy output buffer and
line mark to results file. Prepare to indent further lines by two
spaces more than before *)
PROCEDURE ExdentNextLine;
(* If output buffer has characters other than spaces, copy output buffer and
line mark to results file. Prepare to indent further lines by two
spaces less than before *)
PROCEDURE NewLine;
(* If output buffer has characters other than spaces, copy output buffer and
line mark to results file *)
PROCEDURE BlankLine;
(* NewLine, followed by line mark *)
PROCEDURE Indent;
(* Increment indentation level by two spaces *)
PROCEDURE Exdent;
(* Decrement indentation level by two spaces *)
END Prettier.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?