修复 endmodule 后面的 inlay hints 在结尾处的异常
This commit is contained in:
parent
c26bd9316e
commit
b5671ae752
@ -247,6 +247,11 @@ class HdlParam {
|
|||||||
for (const inst of this.unhandleInstances) {
|
for (const inst of this.unhandleInstances) {
|
||||||
if (inst.type === moduleName) {
|
if (inst.type === moduleName) {
|
||||||
unsolvedInstances.push(inst);
|
unsolvedInstances.push(inst);
|
||||||
|
} else if (inst.type.includes('(')) {
|
||||||
|
const entityName = moduleName.split('(')[0];
|
||||||
|
if (entityName === moduleName) {
|
||||||
|
unsolvedInstances.push(inst);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return unsolvedInstances;
|
return unsolvedInstances;
|
||||||
@ -889,7 +894,7 @@ class HdlModule {
|
|||||||
rawHdlInstance.instports,
|
rawHdlInstance.instports,
|
||||||
rawHdlInstance.range,
|
rawHdlInstance.range,
|
||||||
this);
|
this);
|
||||||
if (!searchResult.path) {
|
if (!searchResult.path || !hdlPath.exist(searchResult.path)) {
|
||||||
hdlParam.addUnhandleInstance(hdlInstance);
|
hdlParam.addUnhandleInstance(hdlInstance);
|
||||||
this.addUnhandleInstance(hdlInstance);
|
this.addUnhandleInstance(hdlInstance);
|
||||||
}
|
}
|
||||||
@ -909,6 +914,10 @@ class HdlModule {
|
|||||||
rawHdlInstance.range,
|
rawHdlInstance.range,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
|
if (!searchResult.path || !hdlPath.exist(searchResult.path)) {
|
||||||
|
hdlParam.addUnhandleInstance(hdlInstance);
|
||||||
|
this.addUnhandleInstance(hdlInstance);
|
||||||
|
}
|
||||||
if (this.nameToInstances) {
|
if (this.nameToInstances) {
|
||||||
const key = this.makeInstanceKey(rawHdlInstance.name, rawHdlInstance.type);
|
const key = this.makeInstanceKey(rawHdlInstance.name, rawHdlInstance.type);
|
||||||
this.nameToInstances.set(key, hdlInstance);
|
this.nameToInstances.set(key, hdlInstance);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user