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
0674d266
Unverified
Commit
0674d266
authored
Jun 20, 2019
by
yann300
Committed by
GitHub
Jun 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2087 from ethereum/Yul
Select Yul compiler
parents
f4d9507c
c1e3fbf9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
compileTab.js
src/app/tabs/compileTab/compileTab.js
+8
-2
compilerContainer.js
src/app/tabs/compileTab/compilerContainer.js
+16
-0
No files found.
src/app/tabs/compileTab/compileTab.js
View file @
0674d266
...
...
@@ -47,13 +47,19 @@ class CompileTab {
}
/**
* Set the compiler to using Solidity or Yul (default to Solidity)
* @params lang {'Solidity' | 'Yul'} ...
*/
setLanguage
(
lang
)
{
this
.
compiler
.
setLanguage
(
lang
)
}
/**
* Compile a specific file of the file manager
* @param {string} target the path to the file to compile
*/
compileFile
(
target
)
{
if
(
!
target
)
throw
new
Error
(
'No target provided for compiliation'
)
if
(
!
/
\.
sol/
.
exec
(
target
))
throw
new
Error
(
`
${
target
}
is not a solidity file. It cannot be compiled with solidity compiler`
)
// only compile *.sol file.
const
provider
=
this
.
fileManager
.
fileProviderOf
(
target
)
if
(
!
provider
)
throw
new
Error
(
`cannot compile
${
target
}
. Does not belong to any explorer`
)
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
src/app/tabs/compileTab/compilerContainer.js
View file @
0674d266
...
...
@@ -175,6 +175,17 @@ class CompilerContainer {
${
this
.
_view
.
versionSelector
}
</div>
</div>
<div class="row w-100 no-gutters mb-2">
<div class="col-sm-4">
<label class="input-group-text border-0" for="languageSelector">Language</label>
</div>
<div class="col-sm-8">
<select onchange="
${
this
.
onchangeLanguage
.
bind
(
this
)}
" class="custom-select" id="languageSelector">
<option>Solidity</option>
<option>Yul</option>
</select>
</div>
</div>
<div class="row w-100 no-gutters">
<div class="col-sm-4">
<label class="input-group-text border-0" for="evmVersionSelector">EVM Version</label>
...
...
@@ -227,6 +238,11 @@ class CompilerContainer {
this
.
compileTabLogic
.
runCompiler
()
}
onchangeLanguage
(
event
)
{
this
.
compileTabLogic
.
setLanguage
(
event
.
target
.
value
)
this
.
compile
()
}
onchangeEvmVersion
(
_
)
{
let
s
=
this
.
_view
.
evmVersionSelector
let
v
=
s
.
value
...
...
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