Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wacc_26_web_client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rk4718
wacc_26_web_client
Commits
f36b61f0
Commit
f36b61f0
authored
Mar 13, 2020
by
Raghav Khanna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear console on every run
parent
38b94d36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
src/App.js
src/App.js
+9
-5
No files found.
src/App.js
View file @
f36b61f0
...
...
@@ -50,6 +50,7 @@ class App extends React.Component {
js
:
{
code
:
""
,
markers
:
[],},
arm
:
{
code
:
""
,
markers
:
[],},
graphData
:
[{}],
consoleReset
:
0
}
}
...
...
@@ -59,7 +60,7 @@ class App extends React.Component {
code
:
newCode
,
markers
:
[{
startRow
:
0
,
startCol
:
2
,
endRow
:
0
,
endCol
:
20
,
className
:
'
warning-highlight
'
,
type
:
'
text
'
}]
},
graphData
:
[{}]
graphData
:
[{}]
,
})
}
...
...
@@ -104,6 +105,9 @@ class App extends React.Component {
window
.
EMULATOR_CONSOLE_READ
=
()
=>
{
return
window
.
prompt
()};
};
clearConsole
=
()
=>
{
this
.
setState
({
consoleReset
:
this
.
state
.
consoleReset
+
1
})
}
processWaccCode
=
async
(
code
)
=>
{
let
rsp
=
await
sendWaccCode
(
code
);
let
graph
=
this
.
state
.
graphData
;
...
...
@@ -124,8 +128,6 @@ class App extends React.Component {
render
()
{
return
(
<
div
className
=
"
App
"
>
<
div
className
=
"
App-code-editors
"
>
<
GridContainer
>
<
GridItem
lg
=
{
12
}
>
...
...
@@ -134,13 +136,15 @@ class App extends React.Component {
<
ButtonStrip
onCompileClick
=
{(
e
)
=>
{
this
.
processWaccCode
(
this
.
state
.
wacc
.
code
)
this
.
clearConsole
()
}}
onStepJsClick
=
{(
e
)
=>
{
this
.
setState
({
js
:
{
code
:
"
Hello World!
"
}})
}}
onStepOverAstClick
=
{(
e
)
=>
{
this
.
readInputCallBack
(
e
)
}}
/
>
}}
/
>
<
/CardBody
>
<
/Card
>
<
/GridItem
>
...
...
@@ -206,7 +210,7 @@ class App extends React.Component {
<
Terminal
commandPassThrough
=
{
cmd
=>
{
window
.
EMULATOR_CONSOLE_READ
=
()
=>
{
return
cmd
[
0
]};
window
.
EMULATOR_IS_INPUT
=
true
;
}}
watchConsoleLogging
hideTopBar
allowTabs
=
{
false
}
/
>
}}
watchConsoleLogging
hideTopBar
allowTabs
=
{
false
}
key
=
{
this
.
state
.
consoleReset
}
/
>
<
/div
>
<
/CardBody
>
<
/Card
>
...
...
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