Merge branch 'devel' into faster-nimsuggest
This commit is contained in:
commit
5d125ca716
29 changed files with 240 additions and 66 deletions
|
|
@ -181,7 +181,7 @@ proc mangle*(name: string): string =
|
|||
of '_':
|
||||
# we generate names like 'foo_9' for scope disambiguations and so
|
||||
# disallow this here:
|
||||
if i < name.len-1 and name[i+1] in Digits:
|
||||
if i > 0 and i < name.len-1 and name[i+1] in Digits:
|
||||
discard
|
||||
else:
|
||||
add(result, c)
|
||||
|
|
|
|||
|
|
@ -218,8 +218,13 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
|
|||
of tyTuple:
|
||||
if inst:
|
||||
result = newNodeX(nkTupleTy)
|
||||
for s in t.n.sons:
|
||||
result.add newIdentDefs(s)
|
||||
# only named tuples have a node, unnamed tuples don't
|
||||
if t.n.isNil:
|
||||
for subType in t.sons:
|
||||
result.add mapTypeToAst(subType, info)
|
||||
else:
|
||||
for s in t.n.sons:
|
||||
result.add newIdentDefs(s)
|
||||
else:
|
||||
result = mapTypeToBracket("tuple", mTuple, t, info)
|
||||
of tySet: result = mapTypeToBracket("set", mSet, t, info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue