pull/5370/head
filip mertens 1 year ago committed by Aniket
parent 8ead13bd59
commit d5425283df
  1. 7
      apps/remix-ide/src/app/plugins/parser/code-parser.tsx

@ -482,7 +482,7 @@ export class CodeParser extends Plugin {
'parser': null
}
let node: genericASTNode
if (nodes && nodes.length && !this.errorState) {
if (nodes && nodes.length) {
node = nodes[nodes.length - 1]
let astNodeDefinition = node
if (!isNodeDefinition(node)) {
@ -524,6 +524,11 @@ export class CodeParser extends Plugin {
if (nodeDefinition.ast && nodeDefinition.parser) {
if (nodeDefinition.ast.name === nodeDefinition.parser.name && nodeDefinition.ast.nodeType === nodeDefinition.parser.type) {
return nodeDefinition.ast
}else{
// if there is a difference and the compiler has compiled correctly assume the ast node is the definition
if(this.compilerService.errorState === false){
return nodeDefinition.ast
}
}
}

Loading…
Cancel
Save