FIxed null warnings
This commit is contained in:
parent
bd135f0203
commit
04689beec3
@ -3,7 +3,7 @@
|
||||
// DO NOT EDIT. //
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
#nullable enable
|
||||
|
||||
namespace Finn.AST;
|
||||
|
||||
|
@ -199,7 +199,7 @@ class Parser
|
||||
if (match(TokenType.At))
|
||||
{
|
||||
Token literal = consume(TokenType.String, "Expect string literal after '@'.");
|
||||
return new((string)(literal.literal ?? ""), true);
|
||||
return new((string)(literal.literal!), true);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -254,7 +254,8 @@ class Parser
|
||||
{
|
||||
if (match(TokenType.Number, TokenType.String))
|
||||
{
|
||||
return new Literal { Value = previous().literal };
|
||||
object literal = previous().literal!;
|
||||
return new Literal { Value = previous().literal! };
|
||||
}
|
||||
|
||||
var ident = name();
|
||||
|
@ -76,7 +76,7 @@ let renderAST outputDir baseName types =
|
||||
// DO NOT EDIT. //
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
#nullable enable
|
||||
|
||||
namespace Finn.AST;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user