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
bcf5047e
Commit
bcf5047e
authored
Jun 17, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set language for solidity compiler
parent
7cbc24e0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
compiler-input.js
remix-solidity/src/compiler/compiler-input.js
+3
-0
compiler.js
remix-solidity/src/compiler/compiler.js
+8
-2
No files found.
remix-solidity/src/compiler/compiler-input.js
View file @
bcf5047e
...
...
@@ -21,5 +21,8 @@ module.exports = (sources, opts) => {
if
(
opts
.
evmVersion
)
{
o
.
settings
.
evmVersion
=
opts
.
evmVersion
}
if
(
opts
.
language
)
{
o
.
language
=
opts
.
language
}
return
JSON
.
stringify
(
o
)
}
remix-solidity/src/compiler/compiler.js
View file @
bcf5047e
...
...
@@ -29,6 +29,8 @@ function Compiler (handleImportCall) {
var
evmVersion
=
null
var
language
=
'Solidity'
this
.
setOptimize
=
function
(
_optimize
)
{
optimize
=
_optimize
}
...
...
@@ -37,6 +39,10 @@ function Compiler (handleImportCall) {
evmVersion
=
_evmVersion
}
this
.
setLanguage
=
function
(
_language
)
{
language
=
_language
}
var
compilationStartTime
=
null
this
.
event
.
register
(
'compilationFinished'
,
(
success
,
data
,
source
)
=>
{
if
(
success
&&
compilationStartTime
)
{
...
...
@@ -94,7 +100,7 @@ function Compiler (handleImportCall) {
var
result
try
{
var
input
=
compilerInput
(
source
.
sources
,
{
optimize
:
optimize
,
evmVersion
:
evmVersion
,
target
:
source
.
target
})
var
input
=
compilerInput
(
source
.
sources
,
{
optimize
:
optimize
,
evmVersion
:
evmVersion
,
language
:
language
,
target
:
source
.
target
})
result
=
compiler
.
compile
(
input
,
missingInputsCallback
)
result
=
JSON
.
parse
(
result
)
}
catch
(
exception
)
{
...
...
@@ -301,7 +307,7 @@ function Compiler (handleImportCall) {
compileJSON
=
function
(
source
)
{
jobs
.
push
({
sources
:
source
})
worker
.
postMessage
({
cmd
:
'compile'
,
job
:
jobs
.
length
-
1
,
input
:
compilerInput
(
source
.
sources
,
{
optimize
:
optimize
,
evmVersion
:
evmVersion
,
target
:
source
.
target
})})
{
optimize
:
optimize
,
evmVersion
:
evmVersion
,
language
:
language
,
target
:
source
.
target
})})
}
worker
.
postMessage
({
cmd
:
'loadVersion'
,
data
:
url
})
}
...
...
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