-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Simplify parser and processor logic * Fix style * Fix nested direct fxml file * Fix tests * Use separate object for code values * Expand expression tests
- Loading branch information
Showing
76 changed files
with
2,988 additions
and
1,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
fx2j-parser/src/main/java/io/github/sheikah45/fx2j/parser/attribute/AssignableAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package io.github.sheikah45.fx2j.parser.attribute; | ||
|
||
sealed public interface AssignableAttribute extends CommonAttribute | ||
permits EventHandlerAttribute, InstancePropertyAttribute {} |
4 changes: 4 additions & 0 deletions
4
fx2j-parser/src/main/java/io/github/sheikah45/fx2j/parser/attribute/CommonAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package io.github.sheikah45.fx2j.parser.attribute; | ||
|
||
sealed public interface CommonAttribute extends FxmlAttribute | ||
permits AssignableAttribute, StaticPropertyAttribute {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...er/src/main/java/io/github/sheikah45/fx2j/parser/attribute/DefaultNameSpaceAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 1 addition & 9 deletions
10
fx2j-parser/src/main/java/io/github/sheikah45/fx2j/parser/attribute/FxmlAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
package io.github.sheikah45.fx2j.parser.attribute; | ||
|
||
public sealed interface FxmlAttribute { | ||
|
||
sealed interface SpecialAttribute extends FxmlAttribute | ||
permits ControllerAttribute, DefaultNameSpaceAttribute, IdAttribute, NameSpaceAttribute {} | ||
|
||
sealed interface CommonAttribute extends FxmlAttribute | ||
permits EventHandlerAttribute, InstancePropertyAttribute, StaticPropertyAttribute {} | ||
|
||
} | ||
public sealed interface FxmlAttribute permits CommonAttribute, SpecialAttribute {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
fx2j-parser/src/main/java/io/github/sheikah45/fx2j/parser/attribute/SpecialAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package io.github.sheikah45.fx2j.parser.attribute; | ||
|
||
sealed public interface SpecialAttribute extends FxmlAttribute | ||
permits ControllerAttribute, DefaultNameSpaceAttribute, IdAttribute, NameSpaceAttribute {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
fx2j-parser/src/main/java/io/github/sheikah45/fx2j/parser/element/AssignableElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.github.sheikah45.fx2j.parser.element; | ||
|
||
sealed public interface AssignableElement extends FxmlElement permits ClassInstanceElement, InstancePropertyElement {} |
19 changes: 2 additions & 17 deletions
19
fx2j-parser/src/main/java/io/github/sheikah45/fx2j/parser/element/ClassInstanceElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
package io.github.sheikah45.fx2j.parser.element; | ||
|
||
import io.github.sheikah45.fx2j.parser.attribute.FxmlAttribute; | ||
import io.github.sheikah45.fx2j.parser.property.Value; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
sealed public interface ClassInstanceElement extends FxmlElement | ||
sealed public interface ClassInstanceElement extends AssignableElement | ||
permits CopyElement, DeclarationElement, IncludeElement, ReferenceElement { | ||
Content content(); | ||
ElementContent<?, ?> content(); | ||
|
||
record Content(List<FxmlAttribute> attributes, List<FxmlElement> children, Value.Single body) { | ||
public Content { | ||
Objects.requireNonNull(attributes, "attributes cannot be null"); | ||
Objects.requireNonNull(children, "children cannot be null"); | ||
Objects.requireNonNull(body, "text cannot be null"); | ||
attributes = List.copyOf(attributes); | ||
children = List.copyOf(children); | ||
} | ||
} | ||
} |
Oops, something went wrong.