mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 08:30:44 +00:00
Issue #302 AS3: more goto declaration - Types, extends, implements, variables, catch variables
This commit is contained in:
@@ -49,13 +49,13 @@ public class FileTextWriter extends GraphTextWriter implements AutoCloseable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileTextWriter hilightSpecial(String text, String type, int index) {
|
||||
public FileTextWriter hilightSpecial(String text, String type, String index) {
|
||||
writeToFile(text);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter hilightSpecial(String text, String type, int index, Map<String, String> data) {
|
||||
public GraphTextWriter hilightSpecial(String text, String type, String index, Map<String, String> data) {
|
||||
writeToFile(text);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -103,14 +103,23 @@ public abstract class GraphTextWriter {
|
||||
}
|
||||
|
||||
public GraphTextWriter hilightSpecial(String text, String type) {
|
||||
return hilightSpecial(text, type, 0);
|
||||
}
|
||||
|
||||
public GraphTextWriter hilightSpecial(String text, String type, int index) {
|
||||
return hilightSpecial(text, type, 0, new HashMap<String, String>());
|
||||
return hilightSpecial(text, type, "0");
|
||||
}
|
||||
|
||||
public GraphTextWriter hilightSpecial(String text, String type, int index) {
|
||||
return hilightSpecial(text, type, ""+index);
|
||||
}
|
||||
|
||||
public GraphTextWriter hilightSpecial(String text, String type, String index) {
|
||||
return hilightSpecial(text, type, "0", new HashMap<String, String>());
|
||||
}
|
||||
|
||||
|
||||
public GraphTextWriter hilightSpecial(String text, String type, int index, Map<String,String> data) {
|
||||
return hilightSpecial(text, type, ""+index, data);
|
||||
}
|
||||
|
||||
public GraphTextWriter hilightSpecial(String text, String type, String index, Map<String,String> data) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,20 +144,20 @@ public class HilightedTextWriter extends GraphTextWriter {
|
||||
|
||||
@Override
|
||||
public HilightedTextWriter hilightSpecial(String text, String type) {
|
||||
return hilightSpecial(text, type, 0);
|
||||
return hilightSpecial(text, type, "0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public HilightedTextWriter hilightSpecial(String text, String type, int index) {
|
||||
public HilightedTextWriter hilightSpecial(String text, String type, String index) {
|
||||
return hilightSpecial(text, type, index, new HashMap<String, String>());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HilightedTextWriter hilightSpecial(String text, String type, int index, Map<String, String> data) {
|
||||
public HilightedTextWriter hilightSpecial(String text, String type, String index, Map<String, String> data) {
|
||||
Map<String, String> ndata = new HashMap<>();
|
||||
ndata.putAll(data);
|
||||
ndata.put("subtype", type);
|
||||
ndata.put("index", Long.toString(index));
|
||||
ndata.put("index", index);
|
||||
start(ndata, HilightType.SPECIAL);
|
||||
appendNoHilight(text);
|
||||
return end(HilightType.SPECIAL);
|
||||
|
||||
@@ -99,13 +99,13 @@ public class NulWriter extends GraphTextWriter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public NulWriter hilightSpecial(String text, String type, int index) {
|
||||
public NulWriter hilightSpecial(String text, String type, String index) {
|
||||
stringAdded = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NulWriter hilightSpecial(String text, String type, int index, Map<String, String> data) {
|
||||
public NulWriter hilightSpecial(String text, String type, String index, Map<String, String> data) {
|
||||
stringAdded = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,16 @@ public class Highlighting implements Serializable {
|
||||
public static Highlighting search(List<Highlighting> list, long pos, Map<String,String> properties, long from, long to) {
|
||||
Highlighting ret = null;
|
||||
looph:for (Highlighting h : list) {
|
||||
if (from > -1) {
|
||||
if (h.startPos < from) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (to > -1) {
|
||||
if (h.startPos > to) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
for(String property:properties.keySet()){
|
||||
if (property != null) {
|
||||
String v = h.getPropertyString(property);
|
||||
@@ -108,16 +118,7 @@ public class Highlighting implements Serializable {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (from > -1) {
|
||||
if (h.startPos < from) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (to > -1) {
|
||||
if (h.startPos > to) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (pos == -1 || (pos >= h.startPos && (pos < h.startPos + h.len))) {
|
||||
if (ret == null || h.startPos > ret.startPos) { //get the closest one
|
||||
ret = h;
|
||||
|
||||
Reference in New Issue
Block a user