some minor fixes
This commit is contained in:
parent
06ad50b671
commit
4ab56d6be0
4 changed files with 4 additions and 4 deletions
|
|
@ -127,7 +127,7 @@ proc definedInScope*(x: expr): bool {.
|
||||||
## **Deprecated since version 0.9.6**: Use ``declaredInScope`` instead.
|
## **Deprecated since version 0.9.6**: Use ``declaredInScope`` instead.
|
||||||
|
|
||||||
proc declaredInScope*(x: expr): bool {.
|
proc declaredInScope*(x: expr): bool {.
|
||||||
magic: "DefinedInScope", noSideEffect, deprecated.}
|
magic: "DefinedInScope", noSideEffect.}
|
||||||
## Special compile-time procedure that checks whether `x` is
|
## Special compile-time procedure that checks whether `x` is
|
||||||
## declared in the current scope. `x` has to be an identifier.
|
## declared in the current scope. `x` has to be an identifier.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ discard """
|
||||||
"""
|
"""
|
||||||
|
|
||||||
template myAssert(cond: expr) =
|
template myAssert(cond: expr) =
|
||||||
when rand(3) < 3:
|
when 3 <= 3:
|
||||||
let c = cond.astToStr
|
let c = cond.astToStr
|
||||||
if not cond:
|
if not cond:
|
||||||
echo c, "ugh"
|
echo c, "ugh"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ discard """
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
[[a = nil,
|
[[a = nil,
|
||||||
b = nil]]
|
b = nil]]'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# bug #1475
|
# bug #1475
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ const
|
||||||
targetToExt*: array[TTarget, string] = ["c", "cpp", "m", "js"]
|
targetToExt*: array[TTarget, string] = ["c", "cpp", "m", "js"]
|
||||||
targetToCmd*: array[TTarget, string] = ["c", "cpp", "objc", "js"]
|
targetToCmd*: array[TTarget, string] = ["c", "cpp", "objc", "js"]
|
||||||
|
|
||||||
when not defined(parseCfgBool):
|
when not declared(parseCfgBool):
|
||||||
# candidate for the stdlib:
|
# candidate for the stdlib:
|
||||||
proc parseCfgBool(s: string): bool =
|
proc parseCfgBool(s: string): bool =
|
||||||
case normalize(s)
|
case normalize(s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue