On Monday, 28 January 2013 at 00:53:03 UTC, Brian Schott wrote:
On Sunday, 27 January 2013 at 23:49:11 UTC, Walter Bright wrote:
On 1/27/2013 1:39 PM, Brian Schott wrote:
The file name is accepted for eventual error reporting
purposes.
Use an OutputRange for that.
I think you misunderstand. The file name is so that if you pass
in "foo.d" the lexer can say "Error: unterminated string
literal beginning on line 123 of foo.d". It's not so that error
messagaes will be written to a file of that name.
I don't think that is a good idea. For instance mixin need to be
lexed but don't come from a file.
The lexer should report the error, what is done on error is up to
the user of the lexer.