x = 0 if flag else 1 should parse as x = (0 if flag else 1), but GDShrapt parses it as (x = 0) if flag else 1 — the assignment becomes the ternary's true branch.
Minimal repro
var content = "class_name T\n\nfunc f(flag: bool) -> void:\n\tvar x: int = 0\n\tx = 0 if flag else 1\n";
var tree = new GDScriptReader().ParseFileContent(content);
var stmt = tree.Methods.First().AllNodes.OfType<GDExpressionStatement>().Last();
// Expected: GDDualOperatorExpression
// Actual: GDIfExpression
Console.WriteLine(stmt.Expression.GetType().Name); // "GDIfExpression"
var tern = (GDIfExpression)stmt.Expression;
Console.WriteLine(tern.TrueExpression); // "x = 0" — assignment is inside the ternary
x = 0 if flag else 1should parse asx = (0 if flag else 1), but GDShrapt parses it as(x = 0) if flag else 1— the assignment becomes the ternary's true branch.Minimal repro