This repository was archived by the owner on Oct 20, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,9 @@ function parsePrint(): SyntaxTree {
235
235
* 0 1 2 3 4
236
236
* a = b + c
237
237
*
238
+ * 0 1 2
239
+ * a = b
240
+ *
238
241
* 01
239
242
* a++
240
243
* a--
@@ -306,20 +309,31 @@ function parseExpression(): SyntaxTree {
306
309
307
310
let operation : Token = getToken ( currentIndex + 3 )
308
311
312
+ /* Assign */
309
313
if ( operation . type != Type . PUNCTUATION ) {
310
314
adjust = 3
315
+
316
+ let argument2 : SyntaxTree
317
+
318
+ /* Constant */
319
+ if ( address1 . type == Type . CONSTANT ) {
320
+ argument2 = createConstant ( address1 )
321
+ /* Identifier */
322
+ } else {
323
+ argument2 = {
324
+ content : VARIABLE ,
325
+ argument1 : { content : address1 } ,
326
+ argument2 : { content : type1 }
327
+ }
328
+ }
311
329
expression = {
312
330
content : ASSIGN ,
313
331
argument1 : {
314
332
content : VARIABLE ,
315
333
argument1 : { content : result } ,
316
334
argument2 : { content : type }
317
335
} ,
318
- argument2 : {
319
- content : VARIABLE ,
320
- argument1 : { content : address1 } ,
321
- argument2 : { content : type1 }
322
- }
336
+ argument2 : argument2
323
337
}
324
338
} else {
325
339
let address2 : Token = getToken ( currentIndex + 4 )
You can’t perform that action at this time.
0 commit comments