From f767e3fb3dfb1c002216331720bd5a738696cfb2 Mon Sep 17 00:00:00 2001 From: Franco Montenegro Date: Mon, 20 Jun 2016 17:31:31 -0300 Subject: [PATCH] Do not auto open editor with log errors --- src/main/java/com/ruke/vrjassc/Main.java | 9 --------- .../com/ruke/vrjassc/vrjassc/phase/TranslationPhase.java | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/ruke/vrjassc/Main.java b/src/main/java/com/ruke/vrjassc/Main.java index dbee0c4..e809767 100644 --- a/src/main/java/com/ruke/vrjassc/Main.java +++ b/src/main/java/com/ruke/vrjassc/Main.java @@ -7,7 +7,6 @@ import de.peeeq.jmpq.JmpqEditor; import de.peeeq.jmpq.JmpqError; -import java.awt.*; import java.io.*; import java.nio.file.Files; import java.nio.file.Paths; @@ -194,14 +193,6 @@ public static void main(String[] args) { if (logWriter != null) { logWriter.close(); - - try { - if (error) { - Desktop.getDesktop().edit(logFile); - } - } catch (IOException e) { - e.printStackTrace(); - } } } diff --git a/src/main/java/com/ruke/vrjassc/vrjassc/phase/TranslationPhase.java b/src/main/java/com/ruke/vrjassc/vrjassc/phase/TranslationPhase.java index ad42a4a..9efe8f5 100644 --- a/src/main/java/com/ruke/vrjassc/vrjassc/phase/TranslationPhase.java +++ b/src/main/java/com/ruke/vrjassc/vrjassc/phase/TranslationPhase.java @@ -245,8 +245,8 @@ public Expression visitVariableExpression(VariableExpressionContext ctx) { if (ctx.index != null) { index = this.visit(ctx.index); - if (symbol.getType() instanceof UserTypeSymbol) { - Symbol operator = ((UserTypeSymbol) symbol.getType()).resolve("[]"); + if (symbol.getType().isUserType()) { + Symbol operator = ((ScopeSymbol) symbol.getType()).resolve("[]"); if (operator != null) { ExpressionList el = new ExpressionList();