From: Clinton Ebadi Date: Fri, 4 Jan 2019 04:03:04 +0000 (-0500) Subject: errormsg: remove errorText X-Git-Tag: release_20190105~1 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/7dbe2779d37da17210a94468cef25f10ae6837fc?ds=sidebyside errormsg: remove errorText This was never used, and makes `print' allocate memory for no good reason. --- diff --git a/src/errormsg.sig b/src/errormsg.sig index 12dbb6e..bd04c40 100644 --- a/src/errormsg.sig +++ b/src/errormsg.sig @@ -7,7 +7,6 @@ signature ERRORMSG = val reset : unit -> unit val anyErrors : bool ref - val errorText : string ref val fileName : string ref val sourceStream : TextIO.instream ref diff --git a/src/errormsg.sml b/src/errormsg.sml index 5c04589..9a3b975 100644 --- a/src/errormsg.sml +++ b/src/errormsg.sml @@ -7,19 +7,16 @@ structure ErrorMsg :> ERRORMSG = (* Initial values of compiler state variables *) val anyErrors = ref false val anyWarnings = ref false - val errorText = ref "" val fileName = ref "" val lineNum = ref 1 val linePos = ref [1] val sourceStream = ref TextIO.stdIn - fun print msg = (errorText := !errorText ^ msg; - TextIO.print msg) + fun print msg = (TextIO.print msg) (* Reset compiler to initial state *) fun reset() = (anyErrors:=false; anyWarnings:=false; - errorText:=""; fileName:=""; lineNum:=1; linePos:=[1];