Closed Rich2 closed 3 years ago
So White space and some comments are to be attributed to the following Token if there is one.
/** This comment on
multiple lines will be attributed. */
/* This comment on
multiple lines will be discarded. */
//* This comment to the end of the line will be attributed.
// This comment to the end of the line will be discarded.
White space outside of comments will be attributed. White-space inside comments will be discarded, including newlines. This will allow comments to be used for line continuation. I think this will be better as the line continuation is indicated at the end of the old line and the beginning of the new line.
@w0d So currently the text position at the start of a file is 1, 1. I'm not entirely comfortable with this as an empty file or empty string has no line 1 and has no first character. Consider also
"\n"
Any thoughts?
I think this is working but it can be tested more thoroughly under #133, so I'm closing this into that issue.
Check out.