refactoring: removed empty withBracketExpr template (#18152)
This commit is contained in:
parent
f10eef29b5
commit
6768f507fb
2 changed files with 6 additions and 14 deletions
|
|
@ -303,8 +303,7 @@ proc semGenericStmt(c: PContext, n: PNode,
|
|||
result = newNodeI(nkCall, n.info)
|
||||
result.add newIdentNode(getIdent(c.cache, "[]"), n.info)
|
||||
for i in 0..<n.len: result.add(n[i])
|
||||
withBracketExpr ctx, n[0]:
|
||||
result = semGenericStmt(c, result, flags, ctx)
|
||||
result = semGenericStmt(c, result, flags, ctx)
|
||||
of nkAsgn, nkFastAsgn:
|
||||
checkSonsLen(n, 2, c.config)
|
||||
let a = n[0]
|
||||
|
|
@ -323,8 +322,7 @@ proc semGenericStmt(c: PContext, n: PNode,
|
|||
result.add newIdentNode(getIdent(c.cache, "[]="), n.info)
|
||||
for i in 0..<a.len: result.add(a[i])
|
||||
result.add(b)
|
||||
withBracketExpr ctx, a[0]:
|
||||
result = semGenericStmt(c, result, flags, ctx)
|
||||
result = semGenericStmt(c, result, flags, ctx)
|
||||
else:
|
||||
for i in 0..<n.len:
|
||||
result[i] = semGenericStmt(c, n[i], flags, ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue