diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-11-29 16:07:51 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-11 21:23:21 +0100 |
commit | 1105d0364401226a2d7d479bd89d77a9da9ed787 (patch) | |
tree | 559160c7497208ca53fb05fc5e97ae03e12e4187 /testament/specs.nim | |
parent | ca394ebd9514edd6e5f5e5c3d3145aa868744647 (diff) | |
download | Nim-1105d0364401226a2d7d479bd89d77a9da9ed787.tar.gz |
require errormsg to be specified before file.
Diffstat (limited to 'testament/specs.nim')
-rw-r--r-- | testament/specs.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testament/specs.nim b/testament/specs.nim index 3583166fe..6c9fafa13 100644 --- a/testament/specs.nim +++ b/testament/specs.nim @@ -143,10 +143,16 @@ proc parseSpec*(filename: string): TSpec = else: result.parseErrors.addLine "cannot interpret as action: ", e.value of "file": + if result.msg.len == 0 and result.nimout.len == 0: + result.parseErrors.addLine "errormsg or msg needs to be specified before file" result.file = e.value of "line": + if result.msg.len == 0 and result.nimout.len == 0: + result.parseErrors.addLine "errormsg, msg or nimout needs to be specified before line" discard parseInt(e.value, result.line) of "column": + if result.msg.len == 0 and result.nimout.len == 0: + result.parseErrors.addLine "errormsg or msg needs to be specified before column" discard parseInt(e.value, result.column) of "tfile": result.tfile = e.value |