Prechádzať zdrojové kódy

Implement new writer function code generation

Implement UI messages for the new newline button

Change success execution message
Lucas de Souza 3 rokov pred
rodič
commit
c992350c56

+ 1 - 1
i18n/message.csv

@@ -7,6 +7,6 @@ assessment-empty-expected-tooltip,A saída gerada foi além do esperado,The gene
 assessment-empty-generated-tooltip,O programa não gerou saídas suficientes,The program did not generate enough outputs," "
 testcase_autogen_unused_input,O caso de teste $0 possui mais entradas do que as leituras feitas no programa.,The test case $0 has more inputs than output than the number of reads present in the algorithm.," "
 testcase_autogen_empty,O caso de teste $0 não gerou qualquer saída.,The test case $0 did not generate any output.," "
-success_execution,Programa executado com sucesso!,Program executed successfully!,
+success_execution,Execução do programa finalizada!,Program execution finished!,
 aborted_execution,A execução do programa foi interrompida!,Program execution was aborted!,
 unexpected_execution_error,Erro inesperado durante a execução do programa.,Unexpected error during program execution.,

+ 1 - 0
i18n/ui.csv

@@ -140,3 +140,4 @@ text_relational_expression,Relacionais,Relational,
 initial_program_code,"programa {\n\n\t\tfuncao vazio inicio () {\n\t\t\t// Inicie seu codigo aqui!\n\t\t}\n}","program {\n\n\t\tfunction void main () {\n\t\t\t// Start your code here!\n\t\t}\n}",
 write_command_newline_on,Quebra de linha ativada, Line break is on,
 write_command_newline_off, Quebra de linha desativada, Line break is off,
+write_seprator_menu_text,Vírgula,Comma,

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 103 - 1
img/new_line.svg


+ 93 - 69
img/no_new_line.svg

@@ -7,50 +7,12 @@
    xmlns="http://www.w3.org/2000/svg"
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   height="16"
-   id="svg2"
-   version="1.1"
+   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+   sodipodi:docname="no_new_line.svg"
    width="16"
-   sodipodi:docname="x_iconfinder_button_linebreak_352910.svg"
-   inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
-  <g
-     id="layer1"
-     transform="translate(0,-1036.3622)">
-    <path
-       d="m 1.5,1044.3622 10,0"
-       id="path3016"
-       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
-    <path
-       d="m 1.5,1042.3622 10,0"
-       id="path3016-1"
-       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
-    <path
-       d="m 1.5,1046.3622 10,0"
-       id="path3016-1-7"
-       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
-    <g
-       id="g3057"
-       transform="translate(-0.5,0)">
-      <path
-         d="m 11,6 4,0 0,2 -2,0"
-         id="path3053"
-         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
-         transform="translate(0,1036.3622)" />
-      <path
-         d="m 14,7 -1,1 1,1"
-         id="path3055"
-         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
-         transform="translate(0,1036.3622)" />
-    </g>
-  </g>
-  <rect
-     transform="matrix(0.88009677,0.47479435,-0.61645077,0.78739345,0,0)"
-     style="fill:#f50000;fill-opacity:1;stroke:#000000;stroke-width:0"
-     id="rect838-3"
-     width="14.841698"
-     height="1.3098975"
-     x="4.0694704"
-     y="2.7956207" />
+   version="1.1"
+   id="svg2"
+   height="16">
   <metadata
      id="metadata13">
     <rdf:RDF>
@@ -59,39 +21,101 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
+        <dc:title></dc:title>
       </cc:Work>
     </rdf:RDF>
   </metadata>
   <sodipodi:namedview
      inkscape:document-rotation="0"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1366"
-     inkscape:window-height="705"
-     id="namedview11"
+     inkscape:current-layer="svg2"
+     inkscape:window-maximized="0"
+     inkscape:window-y="0"
+     inkscape:window-x="0"
+     inkscape:cy="9.3848764"
+     inkscape:cx="5.0740041"
+     inkscape:zoom="32.792077"
+     inkscape:snap-nodes="false"
      showgrid="false"
-     inkscape:zoom="33.625"
-     inkscape:cx="8"
-     inkscape:cy="8"
-     inkscape:window-x="-8"
-     inkscape:window-y="-8"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="svg2" />
+     id="namedview11"
+     inkscape:window-height="729"
+     inkscape:window-width="1350"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0"
+     guidetolerance="10"
+     gridtolerance="10"
+     objecttolerance="10"
+     borderopacity="1"
+     bordercolor="#666666"
+     pagecolor="#ffffff" />
   <defs
      id="defs4" />
+  <g
+     id="g4567">
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       id="path3016"
+       d="m 1.5,8 h 10" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       id="path3016-1-7"
+       d="m 1.5,10 h 10" />
+    <rect
+       y="5.5074291"
+       x="1.4920932"
+       height="0.99583501"
+       width="4.9376159"
+       id="rect4505"
+       style="fill:#323232;fill-opacity:1;stroke:none;stroke-width:1.24414182;stroke-opacity:1" />
+    <path
+       transform="matrix(0.99508079,0,0,1,2.1817665,-1031.8305)"
+       inkscape:transform-center-y="-0.01936877"
+       inkscape:transform-center-x="0.38058868"
+       d="m 3.7768926,1038.418 -0.014031,1.4157 0.023214,1.4156 -1.2190481,-0.72 -1.2375657,-0.6877 1.2330786,-0.6957 z"
+       inkscape:randomized="0"
+       inkscape:rounded="0"
+       inkscape:flatsided="false"
+       sodipodi:arg2="-0.0032434721"
+       sodipodi:arg1="-1.050441"
+       sodipodi:r2="0.7987228"
+       sodipodi:r1="1.63469"
+       sodipodi:cy="1039.8363"
+       sodipodi:cx="2.9641435"
+       sodipodi:sides="3"
+       id="path4517"
+       style="fill:#323232;fill-opacity:1;stroke:none;stroke-opacity:1"
+       sodipodi:type="star" />
+    <rect
+       transform="rotate(-90)"
+       y="6.3963423"
+       x="-8.4870434"
+       height="0.99583501"
+       width="2.979912"
+       id="rect4505-7"
+       style="fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.96652472;stroke-opacity:1" />
+    <rect
+       y="7.5020823"
+       x="5.2290773"
+       height="0.99583501"
+       width="2.1702442"
+       id="rect4505-76"
+       style="fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.82483208;stroke-opacity:1" />
+  </g>
+  <rect
+     transform="matrix(0.90306559,0.42950266,-0.52650978,0.85016907,0,0)"
+     y="4.3678656"
+     x="4.150352"
+     height="0.77366799"
+     width="11.358748"
+     id="rect836"
+     style="fill:#f50000;stroke:#000000;stroke-width:0" />
   <rect
-     y="10.471105"
-     x="-8.700532"
-     height="1.3153578"
-     width="14.788834"
-     id="rect838-3-5"
-     style="fill:#f50000;fill-opacity:1;stroke:#000000;stroke-width:0"
-     transform="matrix(-0.88324276,0.46891601,0.61389179,0.78939019,0,0)" />
+     style="fill:#f50000;stroke:#000000;stroke-width:0"
+     id="rect836-8"
+     width="11.358748"
+     height="0.77366799"
+     x="-8.9218512"
+     y="-10.753339"
+     transform="matrix(-0.901918,0.43190731,-0.32976856,-0.94406181,0,0)" />
 </svg>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 962 - 962
js/visualUI/code_generator.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1244 - 794
js/visualUI/commands/generic_expression.js


+ 1 - 0
js/visualUI/ivprog_elements.js

@@ -39,6 +39,7 @@ export const EXPRESSION_TYPES = Object.freeze({
   exp_conditional: "exp_conditional",
   exp_logic: "exp_logic",
   exp_arithmetic: "exp_arithmetic",
+  write_sep: "write_separator",
 });
 
 export const ARITHMETIC_COMPARISON = Object.freeze({