Skip to content

Commit a128d6c

Browse files
authored
Merge pull request #2 from Federico-G/fede
v1.0.0-alpha2
2 parents d4a0202 + e329bfa commit a128d6c

31 files changed

+1293
-63
lines changed

TODO.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# TODO
2+
3+
## Current
4+
5+
### Contenido
6+
- Usar el espacio de carga para mostrar datos curiosos (estatico, porque freezea js el procesamiento (la carga no))
7+
- Agregar contenido a informacion (nosotros) y a ayuda (en lo posible contenido multimedia)
8+
- Link a screen diagrama en screen info de alguna manera
9+
- Meta: description
10+
- Intentar nuevamente con Google Ads una vez finalizadas las tareas anteriores de **contenido** (https://www.google.com/adsense/)
11+
12+
### Bugs
13+
- AWAIT
14+
- [low] Versión visible en barra en mobile
15+
16+
## V 1.1
17+
- Personalizar nombres al exportar archivos
18+
- Altura del lienzo cambiable según la posición del último elemento (hay que tener en consideración el scale)
19+
- pushState para tomar atrás y adelante del history
20+
21+
## Request features
22+
- Archivos
23+
- Vectores y matrices
24+
- Guardar online para compartir (ya que pwa no soporta abrir cierto tipo de extensiones aun)

public/css/main.css

+14-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ body {
2222
background-color: var(--secondary-color);
2323
}
2424

25+
.main-text-color {
26+
color: var(--main-color) !important;
27+
font-weight: bold;
28+
}
29+
30+
.sql-text-color {
31+
color: var(--secondary-color) !important;
32+
font-weight: bold;
33+
}
34+
2535
#version {
2636
font-size: 10px;
2737
color: #DCB;
@@ -64,10 +74,12 @@ footer a:hover {
6474
/* INFO */
6575

6676
#intro {
67-
padding: 25px;
77+
margin-top: 25px;
78+
margin-bottom: 25px;
79+
padding-right: 25px;
80+
padding-left: 25px;
6881
font-size: 28px;
6982
position: absolute;
70-
padding: 25px;
7183
/*height: 100%;*/
7284
width: 100%;
7385
display: flex;

public/dict.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
background
2+
shape-dowhile
3+
shape-for
4+
shape-if
25
shape-in
36
shape-while
47
shape-op
58
shape-end
69
shape-out
7-
shape-start
10+
shape-start

public/group1-shard1of2.bin

-4 MB
Binary file not shown.

public/group1-shard1of5.bin

2.09 MB
Binary file not shown.

public/group1-shard2of2.bin

-1.1 MB
Binary file not shown.

public/group1-shard2of5.bin

2.09 MB
Binary file not shown.

public/group1-shard3of5.bin

2.09 MB
Binary file not shown.

public/group1-shard4of5.bin

2.09 MB
Binary file not shown.

public/group1-shard5of5.bin

1.2 MB
Binary file not shown.

public/index.html

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
<li class="nav-item">
6262
<a class="nav-link" href="#" onclick="dg.step.screenFunctions(); $('.navbar-collapse').collapse('hide'); return false;">Funciones</a>
6363
</li>
64+
<li class="nav-item">
65+
<a class="nav-link sql-text-color" href="/sql.html">SQL</a>
66+
</li>
6467
<li class="nav-item" style="display: none;">
6568
<a class="nav-link" href="#" id="instalar"><i class='fa fa-mobile'></i> <span>Instalar</span></a>
6669
</li>
@@ -100,6 +103,7 @@ <h5 class="modal-title" id="symbol-table-label">Tabla de símbolos</h5>
100103

101104
<!-- vendor -->
102105
<script src='js/jquery.min.js'></script>
106+
<script src='js/lodash.min.js'></script>
103107
<script src='js/bootstrap.bundle.min.js'></script>
104108
<script src='js/interact.min.js'></script>
105109
<script src='js/compressor.min.js'></script>

public/js/code/SymbolTable.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dg.code.SymbolTable.prototype.addSymbol = function(name, symbol) {
1111

1212
dg.code.SymbolTable.prototype.clone = function() {
1313
var st = new dg.code.SymbolTable;
14-
st.table = $.extend(true, {}, this.table);
14+
// st.table = $.extend(true, {}, this.table);
15+
st.table = _.cloneDeep(this.table);
1516
return st;
1617
}

public/js/code/Tree.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ dg.code.Tree.prototype.prevStep = function() {
2929
var step = this.history.pop();
3030
this.currentSymbolTable = step.getSymbolTable();
3131
this.currentConsole = step.getConsole();
32-
this.currentNode = step.getNode();
33-
return this.history.length ? this.history[this.history.length - 1].getNode() : null;
32+
return this.currentNode = step.getNode();
3433
}
3534
return null;
3635
}

public/js/language/c/bnf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ var grammar = {
149149
{"name": "postfixExpression", "symbols": ["postfixExpression", "_", {"literal":"("}, "_", "expression", "_", {"literal":")"}], "postprocess": d => ({identifiers: bnf_join_id(d[0], d[4]) })},
150150
{"name": "postfixExpression", "symbols": ["postfixExpression", "_", {"literal":"("}, "_", {"literal":")"}], "postprocess": d => d[0]},
151151
{"name": "postfixExpression$string$1", "symbols": [{"literal":"+"}, {"literal":"+"}], "postprocess": function joiner(d) {return d.join('');}},
152-
{"name": "postfixExpression", "symbols": ["identifier", "_", "postfixExpression$string$1"], "postprocess": d => d[0]},
152+
{"name": "postfixExpression", "symbols": ["identifier", "_", "postfixExpression$string$1"], "postprocess": d => ({identifiers: [d[0]]})},
153153
{"name": "postfixExpression$string$2", "symbols": [{"literal":"-"}, {"literal":"-"}], "postprocess": function joiner(d) {return d.join('');}},
154-
{"name": "postfixExpression", "symbols": ["identifier", "_", "postfixExpression$string$2"], "postprocess": d => d[0]},
154+
{"name": "postfixExpression", "symbols": ["identifier", "_", "postfixExpression$string$2"], "postprocess": d => ({identifiers: [d[0]]})},
155155
{"name": "primaryExpression", "symbols": ["identifier"], "postprocess": d => ({identifiers: [d[0]]})},
156156
{"name": "primaryExpression", "symbols": ["constant"]},
157157
{"name": "primaryExpression", "symbols": ["stringLiteral"]},

public/js/language/c/bnf.ne

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ postfixExpression-> primaryExpression {% d => d[0]
179179
| postfixExpression _ "[" _ expression _ "]" {% d => ({identifiers: bnf_join_id(d[0], d[4]) }) %}
180180
| postfixExpression _ "(" _ expression _ ")" {% d => ({identifiers: bnf_join_id(d[0], d[4]) }) %}
181181
| postfixExpression _ "(" _ ")" {% d => d[0] %}
182-
| identifier _ "++" {% d => d[0] %}
183-
| identifier _ "--" {% d => d[0] %}
182+
| identifier _ "++" {% d => ({identifiers: [d[0]]}) %}
183+
| identifier _ "--" {% d => ({identifiers: [d[0]]}) %}
184184

185185
primaryExpression -> identifier {% d => ({identifiers: [d[0]]}) %}
186186
| constant

public/js/language/c/to-code.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ dg.language.CodeToLanguage = function(elements, functions) {
6262
}
6363
}
6464

65-
return ["printf(\"" + retornar + "\"" + (extras.length > 1 ? extras.join(", ") : "") + ");"];
65+
return ["printf(\"" + retornar + "\\n\"" + (extras.length > 1 ? extras.join(", ") : "") + ");"];
6666

6767
case "WHILE":
6868
parser_result = _parse(stype, content);
@@ -74,7 +74,7 @@ dg.language.CodeToLanguage = function(elements, functions) {
7474

7575
case "DOWHILE":
7676
parser_result = _parse(stype, content);
77-
return ["do\n", "while (" + content + ");\n"];
77+
return ["do", "while (" + content + ");\n"];
7878

7979
case "IF":
8080
parser_result = _parse(stype, content);

0 commit comments

Comments
 (0)