Skip to content

Commit

Permalink
Disable missing semi-colon exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Jan 12, 2023
1 parent 91eaaa0 commit 982b26f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -2254,14 +2254,14 @@ public static void rewriteAutoconcats(ParseTree root, Environment env,
}

private static void doMissingSemicolonError(Target target, Set<ConfigCompileException> exceptions) {
String message = "Semicolon ';' expected.";
// String message = "Semicolon ';' expected.";
// if(MSVersion.LATEST.lte(new SimpleVersion(3, 3, 6))) {
// // Warning
// message += " This will be an error in the next version.";
// env.getEnv(CompilerEnvironment.class).addFutureErrorCompilerWarning(message, target);
// } else {
// Error
exceptions.add(new ConfigCompileException(message, target));
// // Error
// exceptions.add(new ConfigCompileException(message, target));
// }
}

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/laytonsmith/core/OptimizationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public void testSconcatWithNonStatement() throws Exception {
optimize("int @i = 0; int @j = 0"));
}

@Test(expected = ConfigCompileException.class)
// @Test(expected = ConfigCompileException.class)
public void testPartialStatementsInStrictMSA() throws Exception {
assertEquals("__statements__(assign(ms.lang.int,@i,0),assign(ms.lang.string,@s,'asdf'))",
optimize("<! strict >\n"
Expand All @@ -606,7 +606,7 @@ public void testPartialStatementsInStrictMSA() throws Exception {
+ "<<<\n", false));
}

@Test(expected = ConfigCompileException.class)
// @Test(expected = ConfigCompileException.class)
public void testPartialStatementsInStrictMSA2() throws Exception {
assertEquals("__statements__(if(dyn(1),__statements__(assign(ms.lang.int,@i,1),msg(@i))))",
optimize("<! strict >\n"
Expand All @@ -618,7 +618,7 @@ public void testPartialStatementsInStrictMSA2() throws Exception {
+ "<<<\n", false));
}

@Test(expected = ConfigCompileException.class)
// @Test(expected = ConfigCompileException.class)
public void testPartialStatementsInStrict() throws Exception {
assertEquals("__statements__(assign(ms.lang.int,@i,1),msg(@i),msg(@i))", optimize("<! strict >\n"
+ "int @i = 1\n"
Expand Down

0 comments on commit 982b26f

Please sign in to comment.