From c030b3a9f1bc784cfa22033e36fe4f9c1ba486af Mon Sep 17 00:00:00 2001 From: Hugi Thordarson Date: Sun, 24 Nov 2024 06:09:26 +0000 Subject: [PATCH] Moved the parser model nodes to a separate package --- .../ng/appserver/templating/NGTemplateParserProxy.java | 10 +++++----- .../appserver/templating/parser/NGDynamicHTMLTag.java | 3 +++ .../appserver/templating/parser/NGTemplateParser.java | 4 ++++ .../templating/parser/{ => model}/PBasicNode.java | 3 ++- .../templating/parser/{ => model}/PCommentNode.java | 2 +- .../templating/parser/{ => model}/PGroupNode.java | 2 +- .../templating/parser/{ => model}/PHTMLNode.java | 2 +- .../appserver/templating/parser/{ => model}/PNode.java | 2 +- 8 files changed, 18 insertions(+), 10 deletions(-) rename ng-appserver/src/main/java/ng/appserver/templating/parser/{ => model}/PBasicNode.java (85%) rename ng-appserver/src/main/java/ng/appserver/templating/parser/{ => model}/PCommentNode.java (76%) rename ng-appserver/src/main/java/ng/appserver/templating/parser/{ => model}/PGroupNode.java (79%) rename ng-appserver/src/main/java/ng/appserver/templating/parser/{ => model}/PHTMLNode.java (76%) rename ng-appserver/src/main/java/ng/appserver/templating/parser/{ => model}/PNode.java (65%) diff --git a/ng-appserver/src/main/java/ng/appserver/templating/NGTemplateParserProxy.java b/ng-appserver/src/main/java/ng/appserver/templating/NGTemplateParserProxy.java index 52faf5d3..55e477b3 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/NGTemplateParserProxy.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/NGTemplateParserProxy.java @@ -21,12 +21,12 @@ import ng.appserver.templating.parser.NGDeclarationFormatException; import ng.appserver.templating.parser.NGHTMLFormatException; import ng.appserver.templating.parser.NGTemplateParser; -import ng.appserver.templating.parser.PBasicNode; -import ng.appserver.templating.parser.PCommentNode; -import ng.appserver.templating.parser.PGroupNode; -import ng.appserver.templating.parser.PHTMLNode; -import ng.appserver.templating.parser.PNode; import ng.appserver.templating.parser.NGDeclaration.NGBindingValue; +import ng.appserver.templating.parser.model.PBasicNode; +import ng.appserver.templating.parser.model.PCommentNode; +import ng.appserver.templating.parser.model.PGroupNode; +import ng.appserver.templating.parser.model.PHTMLNode; +import ng.appserver.templating.parser.model.PNode; import ng.xperimental.NGElementNotFoundElement; import ng.xperimental.NGErrorMessageElement; diff --git a/ng-appserver/src/main/java/ng/appserver/templating/parser/NGDynamicHTMLTag.java b/ng-appserver/src/main/java/ng/appserver/templating/parser/NGDynamicHTMLTag.java index dbf155c6..b2bc151a 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/parser/NGDynamicHTMLTag.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/parser/NGDynamicHTMLTag.java @@ -4,6 +4,9 @@ import java.util.List; import java.util.Objects; +import ng.appserver.templating.parser.model.PHTMLNode; +import ng.appserver.templating.parser.model.PNode; + /** * Represents a dynamic tag in the HTML part of a template */ diff --git a/ng-appserver/src/main/java/ng/appserver/templating/parser/NGTemplateParser.java b/ng-appserver/src/main/java/ng/appserver/templating/parser/NGTemplateParser.java index 89d4a406..36171b76 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/parser/NGTemplateParser.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/parser/NGTemplateParser.java @@ -6,6 +6,10 @@ import java.util.StringTokenizer; import ng.appserver.templating.parser.NGDeclaration.NGBindingValue; +import ng.appserver.templating.parser.model.PBasicNode; +import ng.appserver.templating.parser.model.PCommentNode; +import ng.appserver.templating.parser.model.PGroupNode; +import ng.appserver.templating.parser.model.PNode; /** * The primary entry point for component parsing diff --git a/ng-appserver/src/main/java/ng/appserver/templating/parser/PBasicNode.java b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PBasicNode.java similarity index 85% rename from ng-appserver/src/main/java/ng/appserver/templating/parser/PBasicNode.java rename to ng-appserver/src/main/java/ng/appserver/templating/parser/model/PBasicNode.java index cb75bc39..34a80fb7 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/parser/PBasicNode.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PBasicNode.java @@ -1,9 +1,10 @@ -package ng.appserver.templating.parser; +package ng.appserver.templating.parser.model; import java.util.List; import java.util.Map; import java.util.Objects; +import ng.appserver.templating.parser.NGDynamicHTMLTag; import ng.appserver.templating.parser.NGDeclaration.NGBindingValue; public record PBasicNode( NGDynamicHTMLTag tag ) implements PNode { diff --git a/ng-appserver/src/main/java/ng/appserver/templating/parser/PCommentNode.java b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PCommentNode.java similarity index 76% rename from ng-appserver/src/main/java/ng/appserver/templating/parser/PCommentNode.java rename to ng-appserver/src/main/java/ng/appserver/templating/parser/model/PCommentNode.java index da43b350..16743475 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/parser/PCommentNode.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PCommentNode.java @@ -1,4 +1,4 @@ -package ng.appserver.templating.parser; +package ng.appserver.templating.parser.model; import java.util.Objects; diff --git a/ng-appserver/src/main/java/ng/appserver/templating/parser/PGroupNode.java b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PGroupNode.java similarity index 79% rename from ng-appserver/src/main/java/ng/appserver/templating/parser/PGroupNode.java rename to ng-appserver/src/main/java/ng/appserver/templating/parser/model/PGroupNode.java index 5326924a..5c800b33 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/parser/PGroupNode.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PGroupNode.java @@ -1,4 +1,4 @@ -package ng.appserver.templating.parser; +package ng.appserver.templating.parser.model; import java.util.List; import java.util.Objects; diff --git a/ng-appserver/src/main/java/ng/appserver/templating/parser/PHTMLNode.java b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PHTMLNode.java similarity index 76% rename from ng-appserver/src/main/java/ng/appserver/templating/parser/PHTMLNode.java rename to ng-appserver/src/main/java/ng/appserver/templating/parser/model/PHTMLNode.java index a2acf9de..c38066bb 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/parser/PHTMLNode.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PHTMLNode.java @@ -1,4 +1,4 @@ -package ng.appserver.templating.parser; +package ng.appserver.templating.parser.model; import java.util.Objects; diff --git a/ng-appserver/src/main/java/ng/appserver/templating/parser/PNode.java b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PNode.java similarity index 65% rename from ng-appserver/src/main/java/ng/appserver/templating/parser/PNode.java rename to ng-appserver/src/main/java/ng/appserver/templating/parser/model/PNode.java index 3c251bd7..8ffe7e47 100644 --- a/ng-appserver/src/main/java/ng/appserver/templating/parser/PNode.java +++ b/ng-appserver/src/main/java/ng/appserver/templating/parser/model/PNode.java @@ -1,3 +1,3 @@ -package ng.appserver.templating.parser; +package ng.appserver.templating.parser.model; public sealed interface PNode permits PBasicNode, PGroupNode, PHTMLNode, PCommentNode {} \ No newline at end of file