Commit b000cab7 authored by yann300's avatar yann300

add api function

parent 1ea31f8b
'use strict'
var remix = require('ethereum-remix').util.AstWalker
var remix = require('ethereum-remix')
var SourceMappingDecoder = remix.util.SourceMappingDecoder
var AstWalker = remix.util.AstWalker
var EventManager = remix.lib.EventManager
......@@ -38,12 +38,16 @@ class ContextualListener {
}
declarationOf (node) {
if (node.attributes.referencedDeclaration) {
return this._index['Declarations'][node.attributes.referencedDeclaration]
if (node.attributes && node.attributes.referencedDeclaration) {
return this._index['FlatReferences'][node.attributes.referencedDeclaration]
}
return null
}
referencesOf (node) {
return this._index['Declarations'][node.id]
}
_highlightItems (cursorPosition, compilationResult, file) {
if (this.currentPosition === cursorPosition) return
if (this.currentFile !== file) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment