From 165f74b7fa9a263ec22968561b32394a508cb7f6 Mon Sep 17 00:00:00 2001 From: GiacomoCau Date: Tue, 4 Oct 2022 17:41:16 +0200 Subject: [PATCH] Upgrade Java18 + JavaFx19 --- .classpath | 2 +- .settings/org.eclipse.jdt.core.prefs | 8 ++++---- src/util/LRParser.java | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.classpath b/.classpath index cd94bb9..f8c67cd 100644 --- a/.classpath +++ b/.classpath @@ -6,6 +6,6 @@ - + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index b7ce536..cd98688 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,15 +1,15 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=18 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.compliance=18 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=enabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.compiler.source=18 diff --git a/src/util/LRParser.java b/src/util/LRParser.java index 8d79b7b..376cbe3 100644 --- a/src/util/LRParser.java +++ b/src/util/LRParser.java @@ -78,6 +78,7 @@ protected void createStates(BiFunction, S> newState, S initialSt } } + @SuppressWarnings("preview") protected boolean createActionGoToTable(Function> f) { log.setLength(0); for (int i=0; i T put(int state, String symbol, T t) { public T get(int state, String symbol) { return (T) get(new Key(state, symbol)); } + @SuppressWarnings("preview") private int value(int state, String symbol) { return switch (get(state, symbol)) { case null, default-> 0; case Integer i-> i; case Action a-> a.operand; }; }