File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -28,19 +28,18 @@ bool RootSignatureLexer::LexNumber(RootSignatureToken &Result) {
28
28
if (Literal.hadError )
29
29
return true ; // Error has already been reported so just return
30
30
31
+ if (!Literal.isIntegerLiteral ())
32
+ return true ; // TODO: report unsupported number literal specification
33
+
31
34
// Retrieve the number value to store into the token
32
- if (Literal.isIntegerLiteral ()) {
33
- Result.Kind = TokenKind::int_literal;
35
+ Result.Kind = TokenKind::int_literal;
34
36
35
- APSInt X = APSInt (32 , Result.Signed );
36
- if (Literal.GetIntegerValue (X))
37
- return true ; // TODO: Report overflow error
37
+ APSInt X = APSInt (32 , Result.Signed );
38
+ if (Literal.GetIntegerValue (X))
39
+ return true ; // TODO: Report overflow error
38
40
39
- X = Negative ? -X : X;
40
- Result.IntLiteral = (uint32_t )X.getZExtValue ();
41
- } else {
42
- return true ; // TODO: report unsupported number literal specification
43
- }
41
+ X = Negative ? -X : X;
42
+ Result.IntLiteral = (uint32_t )X.getZExtValue ();
44
43
45
44
AdvanceBuffer (NumSpelling.size ());
46
45
return false ;
You can’t perform that action at this time.
0 commit comments