File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -1028,21 +1028,20 @@ ast atom, [AsdlExpr]:
10281028
10291029 of Token .NUMBER :
10301030 # float
1031- for c in child1.tokenNode.content:
1032- if not (c in '0' .. '9' ):
1033- let f = parseFloat (child1.tokenNode.content)
1034- let pyFloat = newPyFloat (f)
1035- result = newAstConstant (pyFloat)
1031+ if not child1.tokenNode.content.allCharsInSet ({'0' .. '9' }):
1032+ let f = parseFloat (child1.tokenNode.content)
1033+ let pyFloat = newPyFloat (f)
1034+ result = newAstConstant (pyFloat)
10361035 # int
1037- if result .isNil :
1036+ else :
10381037 let pyInt = newPyInt (child1.tokenNode.content)
10391038 result = newAstConstant (pyInt)
10401039
10411040 of Token .STRING :
1042- var strSeq: seq [ string ]
1041+ var str: string
10431042 for child in parseNode.children:
1044- strSeq .add (child.tokenNode.content)
1045- let pyString = newPyString (strSeq. join () )
1043+ str .add (child.tokenNode.content)
1044+ let pyString = newPyString (str )
10461045 result = newAstConstant (pyString)
10471046
10481047 of Token .True :
You can’t perform that action at this time.
0 commit comments