You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix extraction of C# default property values when negative
This commit is contained in:
@@ -430,6 +430,13 @@ namespace Godot.SourceGenerators
|
||||
return true;
|
||||
}
|
||||
|
||||
// Handle negative literals (e.g., `-10`)
|
||||
if (expression is PrefixUnaryExpressionSyntax { Operand: LiteralExpressionSyntax } &&
|
||||
expression.Kind() == SyntaxKind.UnaryMinusExpression)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Handle identifiers (e.g., variable names)
|
||||
if (expression is IdentifierNameSyntax identifier)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user