Richard Smith
9325b50cfe
Make numeric literal parsing interface more value-oriented. ( #407 )
...
Instead of exposing a stateful Parser type, expose only the result of
its parsing action. This also makes the numeric literal code better
mirror the string literal code.
2021-03-22 15:39:44 -07:00
Richard Smith
9400c1c8ae
Switch from manually tracking whether we've emitted any errors to asking the diagnostics machinery. ( #406 )
2021-03-22 14:01:01 -07:00
Richard Smith
d1757d9979
Add location information to diagnostics. ( #385 )
...
Add simple mocking and testing of diagnostic emission to ensure this
works.
2021-03-18 21:05:54 -07:00
Richard Smith
ae9ca945b9
Rename {String,Numeric}LiteralToken -> Lexed{String,Numeric}Literal. ( #373 )
...
This avoids using a name too similar to Token::StringLiteral (the token
kind) and TokenizedBuffer::Token (which is not related to these
classes).
2021-03-16 12:42:52 -07:00
Richard Smith
9a873b46de
Move numeric literal parsing out into its own files. ( #326 )
2021-03-04 19:33:08 -08:00