Skip to content

Commit

Permalink
Whitespace removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
CuppoJava committed Nov 16, 2021
1 parent 261b91a commit 61ce2a5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions compiler/stz-config.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ defsyntax stanza-config :

defproduction sym: Symbol
defrule sym = (?x) when ut(x) is Symbol : ut(x)

defproduction string: String
defrule string = (?x) when ut(x) is String : ut(x)

Expand Down Expand Up @@ -225,7 +225,7 @@ public defn read-config-file () :
(path:False) : false

extract-from-env("STANZA_CONFIG", true)
extract-from-file(".stanza")
extract-from-file(".stanza")
extract-from-env("HOME", false)
throw(Exception("Could not locate .stanza configuration file."))

Expand All @@ -252,7 +252,7 @@ defn verify-installation () :
;Throw an exception if the stanza executable returns the wrong version number.
defn ensure-matching-version! () :
val exe-file = system-filepath(StanzaCompiler)
val v =
val v =
try :
;Retrieve the version of the executable.
call-system-and-get-output(exe-file, [exe-file, "version", "-terse"])
Expand All @@ -261,12 +261,12 @@ defn verify-installation () :
val msg = "Stanza install directory is set to %_, \
but the version of the Stanza executable could not verified. %_"
throw $ Exception(msg % [STANZA-INSTALL-DIR, e])

;Check that the version string is well-formatted.
if not version-string?(v) :
val msg = "Stanza install directory is set to %_, \
but the version of the Stanza executable is invalid: %~."
throw $ Exception(msg % [STANZA-INSTALL-DIR, v])
throw $ Exception(msg % [STANZA-INSTALL-DIR, v])

;Check that the version string matches the version of the
;currently running executable.
Expand All @@ -275,11 +275,11 @@ defn verify-installation () :
val msg = "Stanza install directory is set to %_, \
but the Stanza executable at that location has version %~ whereas \
the currently running executable has version %~."
throw $ Exception(msg % [STANZA-INSTALL-DIR, v, this-v])
throw $ Exception(msg % [STANZA-INSTALL-DIR, v, this-v])

;Check conditions
ensure-license-exists!()
ensure-matching-version!()
ensure-matching-version!()

;============================================================
;============= Environment Variable Substitution ============
Expand Down Expand Up @@ -329,7 +329,7 @@ defn sub-curly (f:String -> String, s:String) -> String :
defstruct EnvSubstitutionError <: Exception :
info:FileInfo|False
name:String

defmethod print (o:OutputStream, e:EnvSubstitutionError) :
val msg = "%_Could not determine value of environment variable %_."
print(o, msg % [info-str(info(e)), name(e)])
Expand Down

0 comments on commit 61ce2a5

Please sign in to comment.