From 0f37044319b04aeefc20e2f39c9a942695dd2143 Mon Sep 17 00:00:00 2001 From: Willem Date: Mon, 20 Jan 2025 04:35:30 +0100 Subject: [PATCH] Missing brackets should be illegial in a real language --- .../src/test/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/EclipseTest.java | 16 ++++++++++++++++ .../x4o/fc18/zion7/FourCornerZionStenoLexer.java | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/nx01-jpp-base/src/test/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/EclipseTest.java b/nx01-jpp-base/src/test/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/EclipseTest.java index 285b59d..c9257da 100644 --- a/nx01-jpp-base/src/test/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/EclipseTest.java +++ b/nx01-jpp-base/src/test/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/EclipseTest.java @@ -201,6 +201,22 @@ public class EclipseTest { // a new egyptian white space program. // https://en.wikipedia.org/wiki/Whitespace_character#Unicode + // =========================================================== + // Case X: brackets brackets brackets and brackets + + @Test + public void testElseBlockWithoutBrackets() { + int a = 123; + int b = 456; + Assertions.assertNotEquals(a, b); + if (a != b) { + Assertions.assertFalse(a == b, "JVM Error"); + } else + Assertions.fail("Bracket missalign"); + a = b; + Assertions.assertEquals(a, b); + } + // =========================================================== // Case X: Static reference works fine in eclipse compiler; //[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project bassboon-jppre: Compilation failure: Compilation failure: diff --git a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java index c610a46..54c960a 100644 --- a/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java +++ b/nx01-x4o-fc18/src/main/java/org/x4o/fc18/zion7/FourCornerZionStenoLexer.java @@ -341,7 +341,7 @@ public class FourCornerZionStenoLexer { if (cakePoint > FourCornerDotCake.FC_NCR1632_XN.getStart() + 512) { magicSparkler = true; continue; // Only fire fraction on lowest value select - } else + } lexer.ncrBankFire(false); magicSparkler = false; }