SCM Repository
Diff of /trunk/src/compiler/IL/check-il-fn.sml
Parent Directory
|
Revision Log
|
Patch
revision 413, Sat Oct 16 15:39:31 2010 UTC | revision 414, Sat Oct 16 18:00:43 2010 UTC | |
---|---|---|
# | Line 35 | Line 35 |
35 | * identify the phase that the check follows and the return result will be true | * identify the phase that the check follows and the return result will be true |
36 | * if any errors were detected. | * if any errors were detected. |
37 | *) | *) |
38 | fun check : string * IL.program -> bool | val check : string * IL.program -> bool |
39 | ||
40 | end = struct | end = struct |
41 | ||
# | Line 47 | Line 47 |
47 | datatype token | datatype token |
48 | = NL | S of string | V of IL.var | VTYS of IL.var list | TY of Ty.ty | TYS of Ty.ty list | = NL | S of string | V of IL.var | VTYS of IL.var list | TY of Ty.ty | TYS of Ty.ty list |
49 | ||
50 | fun err errBuf toks = let | fun error errBuf toks = let |
51 | fun tok2str NL = "\n ** " | fun tok2str NL = "\n ** " |
52 | | tok2str (S s) = s | | tok2str (S s) = s |
53 | | tok2str (V x) = V.toString x | | tok2str (V x) = V.toString x |
# | Line 148 | Line 148 |
148 | ||
149 | fun check (phase, IL.Program{globals, globalInit, actors}) = let | fun check (phase, IL.Program{globals, globalInit, actors}) = let |
150 | val errBuf = ref [] | val errBuf = ref [] |
151 | val errFn = errFn errBuf | val errFn = error errBuf |
152 | fun final () = (case !errBuf | fun final () = (case !errBuf |
153 | of [] => false | of [] => false |
154 | | errs => ( | | errs => ( |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |