Fixed: AS3 p-code parser adding ;trait comment to last instruction

This commit is contained in:
Jindra Petřík
2021-02-08 19:22:59 +01:00
parent b3ad4efeda
commit c61f31b692
8 changed files with 807 additions and 765 deletions

View File

@@ -838,7 +838,7 @@ public class ASM3Parser {
break;
}
if (symb.type == ParsedSymbol.TYPE_COMMENT) {
if (lastIns != null) {
if (lastIns != null && blockStack.contains(ParsedSymbol.TYPE_KEYWORD_CODE)) {
lastIns.comment = (String) symb.value;
}
continue;

View File

@@ -1,7 +1,7 @@
/* The following code was generated by JFlex 1.6.0 */
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2021 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public

View File

@@ -1,3 +1,5 @@
/* The following code was generated by JFlex 1.6.0 */
/*
* Copyright (C) 2010-2021 JPEXS, All rights reserved.
*
@@ -12,7 +14,9 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.exporters.script.graphviz;