public override AstNode ShallowClone() { var res = new AstBlockStatement(Source, Start, End); res.Body.AddRange(Body.AsReadOnlySpan()); return(res); }
static AstBlockStatement MakeBlockStatement(AstStatement statement) { if (statement is AstBlockStatement blockStatement) { return(blockStatement); } var res = new AstBlockStatement(statement); res.Body.Add(statement); return(res); }