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
Matthew Riley
e0a9529882
Add extra parens to avoid clang-format divergence ( #386 )
...
`clang-format-11` formats this multiple-ternary-operator expression differently than `clang-format-10` and `clang-format` at (current) trunk. Adding an extra set of parentheses brings them all in agreement, avoiding oscillation as folks check the file locally then submit to CI.
2021-03-12 02:05:14 -08:00
Richard Smith
97bb6f4e80
Factor out character set handling into a separate file. ( #352 )
2021-03-09 12:38:46 -08:00
Richard Smith
62ae0e08cf
Merge type of diagnostic and its substitutions. ( #366 )
2021-03-08 15:17:21 -08:00
Dave Abrahams
f61b1b18ca
Revert "Merge type of diagnostic and its substitutions. ( #351 )"
...
This reverts commit 33fdabf462 .
2021-03-07 18:47:38 -08:00
Richard Smith
33fdabf462
Merge type of diagnostic and its substitutions. ( #351 )
2021-03-07 10:11:45 -08:00
Richard Smith
62ff5597e4
Cleanups from review of #326 . ( #346 )
2021-03-05 14:37:13 -08:00
Richard Smith
9a873b46de
Move numeric literal parsing out into its own files. ( #326 )
2021-03-04 19:33:08 -08:00