Handle qualifiers after type
This commit is contained in:
parent
82ca3bd37b
commit
01bc01a30c
1 changed files with 6 additions and 1 deletions
|
|
@ -529,9 +529,10 @@ iterator newIdentDefs(nimState: NimState, name: string, node: TSNode, offset: So
|
|||
# struct ABC { int w, h; };
|
||||
#
|
||||
# This is not applicable for procs.
|
||||
let
|
||||
var
|
||||
start = getStartAtom(node)
|
||||
|
||||
let
|
||||
# node[start] - param type
|
||||
(tname0, _, tinfo) = nimState.getNameInfo(node[start].getAtom(), nskType, parent = name)
|
||||
|
||||
|
|
@ -544,6 +545,10 @@ iterator newIdentDefs(nimState: NimState, name: string, node: TSNode, offset: So
|
|||
|
||||
tident = nimState.getIdent(tname, tinfo, exported = false)
|
||||
|
||||
# Skip qualifiers after type
|
||||
while start < node.len - 1 and node[start+1].getName() == "type_qualifier":
|
||||
start += 1
|
||||
|
||||
if start == node.len - 1:
|
||||
# Only for proc with no named param - create a param name based on offset
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue