E004
Error
Syntax and structure
E004 — A file in the WebFluent 2 grammar
WebFluent 3 reads one grammar. wf migrate rewrites a WebFluent 2 project in place.
What the compiler said
error[E004]: `Page` is a WebFluent 2 declaration; this is WebFluent 3 --> src/App.wf:1:1 | 1 | Page Home (path: "/") { | ^^^^ = help: Run `wf migrate` to convert the project to the current grammar = docs: https://webfluent.monzeromer.dev/errors/E004
The fix
Broken
Page Home (path: "/") {
Text("Hi")
}
Fixed
page Home(path: "/", title: "T", description: "D") {
Heading("Hi").h1
}
Run wf migrate once; it rewrites the project in place.
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
lints cannot lower it: it would ship a broken page.