Missing brackets should be illegial in a real language

This commit is contained in:
Willem Cazander 2025-01-20 04:35:30 +01:00
parent 0639949dca
commit 0f37044319
2 changed files with 17 additions and 1 deletions

View file

@ -201,6 +201,22 @@ public class EclipseTest {
// a new egyptian white space program. // a new egyptian white space program.
// https://en.wikipedia.org/wiki/Whitespace_character#Unicode // 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; // 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: //[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:

View file

@ -341,7 +341,7 @@ public class FourCornerZionStenoLexer {
if (cakePoint > FourCornerDotCake.FC_NCR1632_XN.getStart() + 512) { if (cakePoint > FourCornerDotCake.FC_NCR1632_XN.getStart() + 512) {
magicSparkler = true; magicSparkler = true;
continue; // Only fire fraction on lowest value select continue; // Only fire fraction on lowest value select
} else }
lexer.ncrBankFire(false); lexer.ncrBankFire(false);
magicSparkler = false; magicSparkler = false;
} }