Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
9ad7ba32
Commit
9ad7ba32
authored
Sep 16, 2020
by
yann300
Committed by
Aniket
Sep 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use remix-astwalker
parent
1030ea58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
package.json
apps/remix-ide/package.json
+1
-0
contextualListener.js
apps/remix-ide/src/app/editor/contextualListener.js
+3
-5
No files found.
apps/remix-ide/package.json
View file @
9ad7ba32
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
"npm-run-all"
:
"^4.0.2"
,
"npm-run-all"
:
"^4.0.2"
,
"onchange"
:
"^3.2.1"
,
"onchange"
:
"^3.2.1"
,
"remix-analyzer"
:
"0.5.3"
,
"remix-analyzer"
:
"0.5.3"
,
"remix-astwalker"
:
"0.0.25"
,
"remix-debug"
:
"0.4.5"
,
"remix-debug"
:
"0.4.5"
,
"remix-lib"
:
"0.4.30"
,
"remix-lib"
:
"0.4.30"
,
"remix-simulator"
:
"0.1.9-beta.6"
,
"remix-simulator"
:
"0.1.9-beta.6"
,
...
...
apps/remix-ide/src/app/editor/contextualListener.js
View file @
9ad7ba32
'use strict'
'use strict'
const
remixdebug
=
require
(
'@remix-project/remix-debug'
)
const
remixdebug
=
require
(
'@remix-project/remix-debug'
)
const
{
AstWalker
}
=
require
(
'@remix-project/remix-astwalker'
)
const
csjs
=
require
(
'csjs-inject'
)
const
csjs
=
require
(
'csjs-inject'
)
const
SourceMappingDecoder
=
remixdebug
.
SourceMappingDecoder
const
SourceMappingDecoder
=
remixdebug
.
SourceMappingDecoder
const
AstWalker
=
remixdebug
.
AstWalker
const
EventManager
=
require
(
'../../lib/events'
)
const
EventManager
=
require
(
'../../lib/events'
)
const
globalRegistry
=
require
(
'../../global/registry'
)
const
globalRegistry
=
require
(
'../../global/registry'
)
import
{
Plugin
}
from
'@remixproject/engine'
import
{
Plugin
}
from
'@remixproject/engine'
...
@@ -97,8 +97,7 @@ class ContextualListener extends Plugin {
...
@@ -97,8 +97,7 @@ class ContextualListener extends Plugin {
_buildIndex
(
compilationResult
,
source
)
{
_buildIndex
(
compilationResult
,
source
)
{
if
(
compilationResult
&&
compilationResult
.
sources
)
{
if
(
compilationResult
&&
compilationResult
.
sources
)
{
const
callback
=
{}
const
callback
=
(
node
)
=>
{
callback
[
'*'
]
=
(
node
)
=>
{
if
(
node
&&
node
.
referencedDeclaration
)
{
if
(
node
&&
node
.
referencedDeclaration
)
{
if
(
!
this
.
_index
[
'Declarations'
][
node
.
referencedDeclaration
])
{
if
(
!
this
.
_index
[
'Declarations'
][
node
.
referencedDeclaration
])
{
this
.
_index
[
'Declarations'
][
node
.
referencedDeclaration
]
=
[]
this
.
_index
[
'Declarations'
][
node
.
referencedDeclaration
]
=
[]
...
@@ -106,10 +105,9 @@ class ContextualListener extends Plugin {
...
@@ -106,10 +105,9 @@ class ContextualListener extends Plugin {
this
.
_index
[
'Declarations'
][
node
.
referencedDeclaration
].
push
(
node
)
this
.
_index
[
'Declarations'
][
node
.
referencedDeclaration
].
push
(
node
)
}
}
this
.
_index
[
'FlatReferences'
][
node
.
id
]
=
node
this
.
_index
[
'FlatReferences'
][
node
.
id
]
=
node
return
true
}
}
for
(
const
s
in
compilationResult
.
sources
)
{
for
(
const
s
in
compilationResult
.
sources
)
{
this
.
astWalker
.
walk
(
compilationResult
.
sources
[
s
].
ast
,
callback
)
this
.
astWalker
.
walk
Full
(
compilationResult
.
sources
[
s
].
ast
,
callback
)
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment