Region errors are misleading
In the following WebDSL fragment the error recovery is pretty bad. Although the region is correctly identified, the error markers indicating the start and end of the region are misleading, since they suggest that the error is at either place. I suppose we need another kind of error marker (e.g. a bar along the whole region) that indicates there is a problem somewhere within the fragment.
section issues posted by principalpage postedIssues() {
var postedIssues :=
from Issue
where _reporter = ~securityContext.principal
order by _submitted desc
limit 200title{"Issues posted by " output(securityContext.principal.name) " on YellowGrass.org [editing]"} bmain{ buttonToolbar{ homeToolbar(securityContext.principal) } pageHeader2 { "Issues Posted by You" } par { issues(postedIssues.set(), true, true, true, 50, true, true) } }
} // <— region starts here
section due date
template dueDate(i: Issue) {
placeholder dueDate { dueDateView(i) }
}template dueDateView(i: Issue) {
Submitted by Eelco Visser on 21 January 2013 at 09:17
action set() { replace(dueDate, dueDateEdit(i)); }
if(i.hasDueDate) {
output(i.due.format(“d MM yyyy”))
}
submitlink iCalendar // <— error is here
}
// <– region ends here or on the next, or previous line
ajax template dueDateEdit(i: Issue) {
action save() {
replace(dueDate, dueDateView(i)):
}
input(i.due)
submitlink save() [class=“btn”] { “Save” }
}