Fixed small bug with DefaultNodeFactory.

This commit is contained in:
JesseBrault0709 2024-05-28 08:16:36 +02:00
parent 4800ceb34f
commit d5e75ef4a6
4 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,16 @@
---
package com.jessebrault.site
---
<html lang="en">
<head>
<title>$pageTitle</title>
</head>
<body>
<h1>$pageTitle</h1>
<h2>$url</h2>
<p>$greeting</p>
<section>
<%= biographyText.render() %>
</section>
</body>
</html>

View File

@ -41,6 +41,7 @@ public class DefaultNodeFactory implements NodeFactory {
ClosureValueNode.class,
ComponentValueNode.class,
PlainScriptletNode.class,
EqualsScriptletNode.class,
DollarScriptletNode.class,
DollarReferenceNode.class
);

View File

@ -3,11 +3,13 @@ package groowt.view.component.web.ast.node;
import groowt.util.di.annotation.Given;
import groowt.view.component.web.ast.extension.NodeExtensionContainer;
import groowt.view.component.web.util.TokenRange;
import jakarta.inject.Inject;
public class EqualsScriptletNode extends AbstractLeafNode implements GroovyBodyNode {
private final String groovyCode;
@Inject
public EqualsScriptletNode(
NodeExtensionContainer extensionContainer,
@Given TokenRange tokenRange,

View File

@ -62,6 +62,7 @@ class ConvertToGroovy implements Callable<Integer> {
def name = target.name.takeBefore('.wvc')
try {
def compileUnit = new DefaultWebViewComponentTemplateCompileUnit(
target.toString(),
AnonymousWebViewComponent,
ComponentTemplateSource.of(target),
AnonymousWebViewComponent.packageName