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
f09f7616
Unverified
Commit
f09f7616
authored
Mar 05, 2019
by
yann300
Committed by
GitHub
Mar 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1739 from ethereum/swap_it_vyper_compiler
vyper compiler on swap_it
parents
32253882
0fae87f0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
19 deletions
+31
-19
plugin-manager-proxy.js
src/app/components/plugin-manager-proxy.js
+15
-9
contextView.js
src/app/editor/contextView.js
+1
-1
contextualListener.js
src/app/editor/contextualListener.js
+4
-3
staticAnalysisView.js
src/app/staticanalysis/staticAnalysisView.js
+1
-0
compile-tab.js
src/app/tabs/compile-tab.js
+1
-1
landing-page.js
src/app/ui/landing-page/landing-page.js
+7
-3
remixAppManager.js
src/remixAppManager.js
+2
-2
No files found.
src/app/components/plugin-manager-proxy.js
View file @
f09f7616
...
@@ -8,20 +8,26 @@ class PluginManagerProxy {
...
@@ -8,20 +8,26 @@ class PluginManagerProxy {
constructor
()
{
constructor
()
{
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
this
.
_listeners
=
{}
this
.
_listeners
[
'vyper'
]
=
(
data
)
=>
{
registry
.
get
(
'compilersartefacts'
).
api
[
'__last'
]
=
new
CompilerAbstract
(
data
.
language
,
data
.
result
,
data
.
content
)
this
.
event
.
trigger
(
'sendCompilationResult'
,
[
data
.
title
,
data
.
content
,
data
.
language
,
data
.
result
])
}
this
.
_listeners
[
'solidity'
]
=
(
file
,
source
,
languageVersion
,
data
)
=>
{
registry
.
get
(
'compilersartefacts'
).
api
[
'__last'
]
=
new
CompilerAbstract
(
languageVersion
,
data
,
source
)
this
.
event
.
trigger
(
'sendCompilationResult'
,
[
file
,
source
,
languageVersion
,
data
])
}
}
}
register
(
instance
)
{
register
(
name
,
instance
)
{
var
event
=
this
.
event
if
(
this
.
_listeners
[
name
])
{
this
.
_listener
=
(
file
,
source
,
languageVersion
,
data
)
=>
{
instance
.
events
.
on
(
'compilationFinished'
,
this
.
_listeners
[
name
])
registry
.
get
(
'compilersartefacts'
).
api
[
'__last'
]
=
new
CompilerAbstract
(
languageVersion
,
data
,
source
)
event
.
trigger
(
'sendCompilationResult'
,
[
file
,
source
,
languageVersion
,
data
])
}
}
instance
.
events
.
on
(
'compilationFinished'
,
this
.
_listener
)
}
}
unregister
(
instance
)
{
unregister
(
name
,
instance
)
{
if
(
!
this
.
_listener
)
{
if
(
this
.
_listeners
[
name
]
)
{
instance
.
events
.
off
(
'compilationFinished'
,
this
.
_listener
)
instance
.
events
.
off
(
'compilationFinished'
,
this
.
_listener
s
[
name
]
)
}
}
}
}
...
...
src/app/editor/contextView.js
View file @
f09f7616
...
@@ -97,7 +97,7 @@ class ContextView {
...
@@ -97,7 +97,7 @@ class ContextView {
}
}
}
}
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
if
(
lastCompilationResult
&&
lastCompilationResult
.
data
)
{
if
(
lastCompilationResult
&&
lastCompilationResult
.
languageversion
.
indexOf
(
'soljson'
)
===
0
&&
lastCompilationResult
.
data
)
{
const
lineColumn
=
this
.
_deps
.
offsetToLineColumnConverter
.
offsetToLineColumn
(
const
lineColumn
=
this
.
_deps
.
offsetToLineColumnConverter
.
offsetToLineColumn
(
position
,
position
,
position
.
file
,
position
.
file
,
...
...
src/app/editor/contextualListener.js
View file @
f09f7616
...
@@ -27,6 +27,7 @@ class ContextualListener {
...
@@ -27,6 +27,7 @@ class ContextualListener {
this
.
_activeHighlights
=
[]
this
.
_activeHighlights
=
[]
this
.
pluginManager
.
event
.
register
(
'sendCompilationResult'
,
(
file
,
source
,
languageVersion
,
data
)
=>
{
this
.
pluginManager
.
event
.
register
(
'sendCompilationResult'
,
(
file
,
source
,
languageVersion
,
data
)
=>
{
if
(
languageVersion
.
indexOf
(
'soljson'
)
!==
0
)
return
this
.
_stopHighlighting
()
this
.
_stopHighlighting
()
this
.
_index
=
{
this
.
_index
=
{
Declarations
:
{},
Declarations
:
{},
...
@@ -40,7 +41,7 @@ class ContextualListener {
...
@@ -40,7 +41,7 @@ class ContextualListener {
this
.
sourceMappingDecoder
=
new
SourceMappingDecoder
()
this
.
sourceMappingDecoder
=
new
SourceMappingDecoder
()
this
.
astWalker
=
new
AstWalker
()
this
.
astWalker
=
new
AstWalker
()
setInterval
(()
=>
{
setInterval
(()
=>
{
if
(
this
.
_deps
.
compilersArtefacts
[
'__last'
])
{
if
(
this
.
_deps
.
compilersArtefacts
[
'__last'
]
&&
this
.
_deps
.
compilersArtefacts
[
'__last'
].
languageversion
.
indexOf
(
'soljson'
)
===
0
)
{
this
.
_highlightItems
(
this
.
editor
.
getCursorPosition
(),
this
.
_deps
.
compilersArtefacts
[
'__last'
],
this
.
_deps
.
config
.
get
(
'currentFile'
))
this
.
_highlightItems
(
this
.
editor
.
getCursorPosition
(),
this
.
_deps
.
compilersArtefacts
[
'__last'
],
this
.
_deps
.
config
.
get
(
'currentFile'
))
}
}
},
1000
)
},
1000
)
...
@@ -105,14 +106,14 @@ class ContextualListener {
...
@@ -105,14 +106,14 @@ class ContextualListener {
const
position
=
this
.
sourceMappingDecoder
.
decode
(
node
.
src
)
const
position
=
this
.
sourceMappingDecoder
.
decode
(
node
.
src
)
const
eventId
=
this
.
_highlightInternal
(
position
,
node
)
const
eventId
=
this
.
_highlightInternal
(
position
,
node
)
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
if
(
eventId
&&
lastCompilationResult
)
{
if
(
eventId
&&
lastCompilationResult
&&
lastCompilationResult
.
languageversion
.
indexOf
(
'soljson'
)
===
0
)
{
this
.
_activeHighlights
.
push
({
eventId
,
position
,
fileTarget
:
lastCompilationResult
.
getSourceName
(
position
.
file
),
nodeId
:
node
.
id
})
this
.
_activeHighlights
.
push
({
eventId
,
position
,
fileTarget
:
lastCompilationResult
.
getSourceName
(
position
.
file
),
nodeId
:
node
.
id
})
}
}
}
}
_highlightInternal
(
position
,
node
)
{
_highlightInternal
(
position
,
node
)
{
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
let
lastCompilationResult
=
this
.
_deps
.
compilersArtefacts
[
'__last'
]
if
(
lastCompilationResult
)
{
if
(
lastCompilationResult
&&
lastCompilationResult
.
languageversion
.
indexOf
(
'soljson'
)
===
0
)
{
let
lineColumn
=
this
.
_deps
.
offsetToLineColumnConverter
.
offsetToLineColumn
(
position
,
position
.
file
,
lastCompilationResult
.
getSourceCode
().
sources
,
lastCompilationResult
.
getAsts
())
let
lineColumn
=
this
.
_deps
.
offsetToLineColumnConverter
.
offsetToLineColumn
(
position
,
position
.
file
,
lastCompilationResult
.
getSourceCode
().
sources
,
lastCompilationResult
.
getAsts
())
let
css
=
'highlightreference'
let
css
=
'highlightreference'
if
(
node
.
children
&&
node
.
children
.
length
)
{
if
(
node
.
children
&&
node
.
children
.
length
)
{
...
...
src/app/staticanalysis/staticAnalysisView.js
View file @
f09f7616
...
@@ -30,6 +30,7 @@ function staticAnalysisView (localRegistry) {
...
@@ -30,6 +30,7 @@ function staticAnalysisView (localRegistry) {
self
.
lastCompilationResult
=
null
self
.
lastCompilationResult
=
null
self
.
lastCompilationSource
=
null
self
.
lastCompilationSource
=
null
$
(
'#staticanalysisresult'
).
empty
()
$
(
'#staticanalysisresult'
).
empty
()
if
(
languageVersion
.
indexOf
(
'soljson'
)
!==
0
)
return
self
.
lastCompilationResult
=
data
self
.
lastCompilationResult
=
data
self
.
lastCompilationSource
=
source
self
.
lastCompilationSource
=
source
if
(
self
.
view
.
querySelector
(
'#autorunstaticanalysis'
).
checked
)
{
if
(
self
.
view
.
querySelector
(
'#autorunstaticanalysis'
).
checked
)
{
...
...
src/app/tabs/compile-tab.js
View file @
f09f7616
...
@@ -81,7 +81,7 @@ class CompileTab {
...
@@ -81,7 +81,7 @@ class CompileTab {
this
.
compiler
.
event
.
register
(
'compilationFinished'
,
(
success
,
data
,
source
)
=>
{
this
.
compiler
.
event
.
register
(
'compilationFinished'
,
(
success
,
data
,
source
)
=>
{
if
(
success
)
{
if
(
success
)
{
// forwarding the event to the appManager infra
// forwarding the event to the appManager infra
this
.
events
.
emit
(
'compilationFinished'
,
source
.
target
,
source
,
this
.
data
.
selectedVersion
,
data
)
this
.
events
.
emit
(
'compilationFinished'
,
source
.
target
,
source
,
'soljson'
,
data
)
// Store the contracts
// Store the contracts
this
.
data
.
contractsDetails
=
{}
this
.
data
.
contractsDetails
=
{}
this
.
compiler
.
visitContracts
((
contract
)
=>
{
this
.
compiler
.
visitContracts
((
contract
)
=>
{
...
...
src/app/ui/landing-page/landing-page.js
View file @
f09f7616
...
@@ -18,8 +18,12 @@ var css = csjs`
...
@@ -18,8 +18,12 @@ var css = csjs`
font-family : "Lucida Console", Monaco, monospace;
font-family : "Lucida Console", Monaco, monospace;
}
}
.logo {
.logo {
position: absolute;
position : absolute;
opacity: 0.3;
opacity : 0.3;
z-index : 0;
}
.section {
z-index : 10;
}
}
`
`
...
@@ -36,7 +40,7 @@ class LandingPage {
...
@@ -36,7 +40,7 @@ class LandingPage {
`
`
for
(
var
i
=
0
;
i
<
this
.
sections
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
sections
.
length
;
i
++
)
{
totalLook
.
appendChild
(
yo
`
totalLook
.
appendChild
(
yo
`
<div>
<div
class="
${
css
.
section
}
"
>
${
this
.
sections
[
i
].
render
()}
${
this
.
sections
[
i
].
render
()}
</div>
</div>
`
)
`
)
...
...
src/remixAppManager.js
View file @
f09f7616
...
@@ -26,8 +26,8 @@ export class RemixAppManager extends AppManagerApi {
...
@@ -26,8 +26,8 @@ export class RemixAppManager extends AppManagerApi {
setActive
(
name
,
isActive
)
{
setActive
(
name
,
isActive
)
{
const
entity
=
this
.
getEntity
(
name
)
const
entity
=
this
.
getEntity
(
name
)
// temp
// temp
if
(
entity
&&
name
===
'solidity'
)
{
if
(
entity
&&
(
name
===
'solidity'
||
name
===
'vyper'
)
)
{
isActive
?
this
.
data
.
proxy
.
register
(
entity
.
api
)
:
this
.
data
.
proxy
.
unregister
(
entity
.
api
)
isActive
?
this
.
data
.
proxy
.
register
(
name
,
entity
.
api
)
:
this
.
data
.
proxy
.
unregister
(
name
,
entity
.
api
)
}
}
isActive
?
this
.
store
.
activate
(
name
)
:
this
.
store
.
deactivate
(
name
)
isActive
?
this
.
store
.
activate
(
name
)
:
this
.
store
.
deactivate
(
name
)
if
(
!
isActive
)
{
if
(
!
isActive
)
{
...
...
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