From caf37951dae394fb50f4213731a59e71e2c11c0e Mon Sep 17 00:00:00 2001 From: ampan98 Date: Mon, 29 Jun 2020 19:10:46 +0800 Subject: [PATCH] Fix input and output printing for REPL Signed-off-by: ampan98 --- assets/select_background.png | Bin 5090 -> 5563 bytes lib/main.dart | 42 +++++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/assets/select_background.png b/assets/select_background.png index 9f615153bb276605d4f84a03c618d8290a604fa7..c3c8144bd36487cbb2b88fb8fe33106f5d244907 100644 GIT binary patch delta 5267 zcmX9?X*iT`7k_3fGmM?Gn;~S2$*zSVYe}|}5+<^irnDeDBWodBvS;5?3fY%oC?va7 z_OX*?M9g5uJOAtbbgtiW&V60yKKFv?a+?5O3i!A;(!al8x}N2{`7Y&OCvK}!XgRcaci`v2D*8{np`avz_SLZ${d$$Jw08F2Xf5ImtO@U8lhWfUCj_Z>v>HJ!+0n2Z5 zHH{IKvEzu1-bGsWLk=rh$(`9k+tG(yR5oVIm0-J}A3p?>PD8xGx@0$jbC2iZz_9G6 zg29p)&>7}SDXNS3^Qr0GIv-@?R&ah z@Z7Q@J+Y-Wh_*E=!8TGP{CJx^sYR_6i#xY+XSOH3 zPkrUnmm3UFpSr#kyg}{E4`#QFAM6=; zq))GY#C*_s>Y2xKP~n8Ve`{qlOjk&g3g2m-#3x#-ncH6<`EeW#VXV_rkfqJvtn!wS zLm1QOj{BzI-oCrORJzHF>6x*LKSZ2&XGeedl&F;$yte8MWpZp*CWZx#YE$7|SBQb5 z;WvZLJUg)t_%4A4Y18BIEe(|nO>>x9UuRhu9^|*mg|$vd>QlRj%W`XC8wOvjU5B+VjH>9}-CtPGu|MuWEOHVK zW^n#3<2#BbW!~zU8-oqC=)FXYwvpPK{bS4a{T`I>rmJ@Ek=U3JEp-*gEx9qf&NgyQ z0@E~modgGXognw9Jgka`(rZ%-PYPw%MuZ&gm6SO>mLUGR@MA+_3475p`G5?;RHr9{ z{L^0IcbToL-0qHl^!gAW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uE>MmNT3R|hvY8pr$a(HHY?x_y+6A2UsHFC}jtjXGEON`gRE})>I2+uKE*?R3U~E-G8A@LHw>>R% zBE6M^VH|~-+==ewbgEh&~R=}OCBx8xp+|vz4j6%h)?+r}c zS{(c|oANlMFWS+sU#r&j-L>AU!_00l8wr+&jB-mFO7q4yeH%Lj6HqV{?}=zLzK5mp zxj8$*P4}HhM)m2k4*q}ZomiB8wPaN$`SHBCXp*2p8sAV^%F@nT{+7Q(@L{1Q z)h0vc&I36qdC4-8IY#l(0a~>({t^~A6Z6X{RD8>jM~s-OeKXSX6GQ0OLD{g5TW+?l zRnf=Lf;zF7GT(ybWt7^HRz}L{-}K7Wa1mR77LOp%Wc+29TZaTaoQE@8li}jdJx88% zJ41oV8{_UaeAjPr#eECU^|H`X>rupc-Fx5}d0#{JVIH*vh^xLdAj`Smh7WgK7T~24xN=P+oC`%ew9ddBM^zkn+KccObQJDTL3lJpBYRuNMyAow z`H4ru2LFV|ru*uAJKh85VZF}cp2s3kKhNFz=|&D~XJd^0=2-7ky?NnMHS?04&|dY$ z1Y7q|H`}zqO)@<*FQ|BR87EmO-0yEAZo2RBu(vN^XRZ$D z*T?#jclw;VJp`T^WUjP(U1u8=By_5a-hTAOyelACDs*+WSYoFwR(_ct=l6S%EGir*HPigLh1U3!x%3eGQ%jc~V!_lZj6rp((x{nh qlfIODEd2l1Z9!frF;P`L0ndu;_ft(N)~8JzfT6){{aRhu$NvLMed`|p diff --git a/lib/main.dart b/lib/main.dart index d79b77d..ee281b8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -311,8 +311,8 @@ class ReplBody extends StatefulWidget { class _ReplBodyState extends State { final TextEditingController _controller = TextEditingController(); FocusNode replNode = FocusNode(); - var prevSubmitList = []; var outputList = []; + var containerId = 'none'; @override void initState() { @@ -347,7 +347,17 @@ class _ReplBodyState extends State { stream: widget.channel.stream, builder: (context, snapshot) { if (snapshot.hasData) { - outputList.add(snapshot.data); + Map outputData = jsonDecode(snapshot.data); + if (outputData["containerId"] != null) { + containerId = outputData["containerId"]; + } + if (outputData["output"] != null) { + if (outputData["output"].substring(0,4) == '>>> ') { + outputList.add(outputData["output"].substring(4)); + } else { + outputList.add(outputData["output"]); + } + } } debugPrint('$outputList'); if (!snapshot.hasData) { @@ -438,6 +448,7 @@ class _ReplBodyState extends State { void _sendSubmit() { if (_controller.text.isNotEmpty) { //widget.channel.sink.add(_controller.text); + outputList.add('>>> ' + _controller.text); widget.channel.sink.add( json.encode( {"action": "input", @@ -445,9 +456,7 @@ class _ReplBodyState extends State { } ) ); - prevSubmitList.add(_controller.text); _controller.clear(); - debugPrint('$prevSubmitList'); } } @@ -465,8 +474,8 @@ class _ReplBodyState extends State { class CompilerPage extends StatelessWidget { CompilerPage({Key key, this.name}) : super(key: key); final String name; - final String channelName = 'wss://echo.websocket.org'; // For testing websocket - //final String channelName = 'wss://s4tdw93cwd.execute-api.us-east-1.amazonaws.com/default/'; + //final String channelName = 'wss://echo.websocket.org'; // For testing websocket + final String channelName = 'wss://s4tdw93cwd.execute-api.us-east-1.amazonaws.com/default/'; @override Widget build(BuildContext context) { @@ -525,8 +534,8 @@ class _CompilerBodyState extends State { FocusNode replNode = FocusNode(); bool _firstRun = true; bool _visible = false; - var prevSubmitList = []; var outputList = []; + var containerId = 'none'; @override void initState() { @@ -635,7 +644,14 @@ class _CompilerBodyState extends State { stream: widget.channel.stream, builder: (context, snapshot) { if (snapshot.hasData) { - outputList.add(snapshot.data); + Map outputData = jsonDecode(snapshot.data); + if (outputData["containerId"] != null) { + containerId = outputData["containerId"]; + } + if (outputData["output"] != null) { + outputList.add(outputData["output"]); + } + //outputList.add(snapshot.data); } debugPrint('$outputList'); if (!snapshot.hasData) { @@ -743,8 +759,11 @@ class _CompilerBodyState extends State { else { widget.channel.sink.add( json.encode( - {"action": "input", - "input": _topController.text, + { + "action": "launch", + "lang": widget.name.toLowerCase(), + "mode": "compile", + "prog": _topController.text, } ) ); @@ -756,6 +775,7 @@ class _CompilerBodyState extends State { void _sendSubmit() { if (_bottomController.text.isNotEmpty) { //widget.channel.sink.add(_controller.text); + outputList.add(_bottomController.text); widget.channel.sink.add( json.encode( {"action": "input", @@ -763,9 +783,7 @@ class _CompilerBodyState extends State { } ) ); - prevSubmitList.add(_bottomController.text); _bottomController.clear(); - debugPrint('$prevSubmitList'); } }