diff options
| author | Stefan Monnier | 2010-12-10 19:13:08 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-10 19:13:08 -0500 |
| commit | 2c302df3a13236bfbf8ea1b771d13618fcda8d71 (patch) | |
| tree | f26dc9f22861dc37610de319d05255de058c221b /test/indent/modula2.mod | |
| parent | 0c747cb143fa227e78f350ac353d703f489209df (diff) | |
| parent | 175069efeb080517afefdd44a06f7a779ea8c25c (diff) | |
| download | emacs-2c302df3a13236bfbf8ea1b771d13618fcda8d71.tar.gz emacs-2c302df3a13236bfbf8ea1b771d13618fcda8d71.zip | |
Merge from trunk
Diffstat (limited to 'test/indent/modula2.mod')
| -rw-r--r-- | test/indent/modula2.mod | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/indent/modula2.mod b/test/indent/modula2.mod new file mode 100644 index 00000000000..f8fbcb7f4e5 --- /dev/null +++ b/test/indent/modula2.mod | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | (* -*- mode: modula-2; m2-indent:3 -*- *) | ||
| 2 | |||
| 3 | IMPLEMENTATION MODULE Indent ; | ||
| 4 | |||
| 5 | (* This is (* a nested comment *) *) | ||
| 6 | // This is a single-line comment. | ||
| 7 | |||
| 8 | FROM SYSTEM IMPORT ADR, TSIZE, SIZE, WORD ; | ||
| 9 | |||
| 10 | CONST | ||
| 11 | c1 = 2; | ||
| 12 | |||
| 13 | TYPE | ||
| 14 | t = POINTER TO ARRAY [0..10] OF LONGINT; | ||
| 15 | |||
| 16 | VAR x: t; | ||
| 17 | y:LONGINT; | ||
| 18 | |||
| 19 | |||
| 20 | PROCEDURE f1 (f: File) : INTEGER ; | ||
| 21 | VAR | ||
| 22 | fd: FileDescriptor ; | ||
| 23 | PROCEDURE foo (a:CARDINAL) : INTEGER; | ||
| 24 | BEGIN | ||
| 25 | END foo; | ||
| 26 | BEGIN | ||
| 27 | IF f#Error | ||
| 28 | THEN | ||
| 29 | fd := GetIndice(FileInfo, f) ; | ||
| 30 | IF fd#NIL THEN | ||
| 31 | RETURN( fd^.unixfd ) | ||
| 32 | ELSE | ||
| 33 | CASE z OF | ||
| 34 | 1: do1(); | ||
| 35 | | 2: do2(); | ||
| 36 | toto(x); | ||
| 37 | | 3: ; | ||
| 38 | | 4: do4(); | ||
| 39 | ELSE do5(); | ||
| 40 | END ; (* CASE selection *) | ||
| 41 | |||
| 42 | END | ||
| 43 | END ; | ||
| 44 | FormatError1('file %d has not been opened or is out of range\n', f) ; | ||
| 45 | RETURN( -1 ) | ||
| 46 | END f1 ; | ||
| 47 | |||
| 48 | |||
| 49 | BEGIN | ||
| 50 | init | ||
| 51 | FINALLY | ||
| 52 | done | ||
| 53 | END Indent. | ||