fixes #4040
This commit is contained in:
parent
299351a909
commit
38040e7691
1 changed files with 8 additions and 1 deletions
|
|
@ -419,7 +419,14 @@ proc evalOp(m: TMagic, n, a, b, c: PNode): PNode =
|
||||||
result = newStrNodeT(substr(getStr(a), int(getOrdValue(b)),
|
result = newStrNodeT(substr(getStr(a), int(getOrdValue(b)),
|
||||||
int(getOrdValue(c))), n)
|
int(getOrdValue(c))), n)
|
||||||
of mFloatToStr: result = newStrNodeT($getFloat(a), n)
|
of mFloatToStr: result = newStrNodeT($getFloat(a), n)
|
||||||
of mCStrToStr, mCharToStr: result = newStrNodeT(getStrOrChar(a), n)
|
of mCStrToStr, mCharToStr:
|
||||||
|
if a.kind == nkBracket:
|
||||||
|
var s = ""
|
||||||
|
for b in a.sons:
|
||||||
|
s.add b.getStrOrChar
|
||||||
|
result = newStrNodeT(s, n)
|
||||||
|
else:
|
||||||
|
result = newStrNodeT(getStrOrChar(a), n)
|
||||||
of mStrToStr: result = a
|
of mStrToStr: result = a
|
||||||
of mEnumToStr: result = newStrNodeT(ordinalValToString(a), n)
|
of mEnumToStr: result = newStrNodeT(ordinalValToString(a), n)
|
||||||
of mArrToSeq:
|
of mArrToSeq:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue