make strformat work as NimScript again
This commit is contained in:
parent
9f5d9d1993
commit
f6ad071a46
1 changed files with 5 additions and 2 deletions
|
|
@ -513,8 +513,11 @@ macro `&`*(pattern: string): untyped =
|
|||
try:
|
||||
x = parseExpr(subexpr)
|
||||
except ValueError:
|
||||
let msg = getCurrentExceptionMsg()
|
||||
error("could not parse ``" & subexpr & "``.\n" & msg, pattern)
|
||||
when declared(getCurrentExceptionMsg):
|
||||
let msg = getCurrentExceptionMsg()
|
||||
error("could not parse `" & subexpr & "`.\n" & msg, pattern)
|
||||
else:
|
||||
error("could not parse `" & subexpr & "`.\n", pattern)
|
||||
let formatSym = bindSym("formatValue", brOpen)
|
||||
var options = ""
|
||||
if f[i] == ':':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue