syntax: Display spans for open delimiters when a file ends prematurely

r? anybody It's more helpful to list the span of each open delimiter seen so far
than to print out an error with the span of the last position in the file.

Closes #2354