Esempio n. 1
0
    public override AstNode ShallowClone()
    {
        var res = new AstBlockStatement(Source, Start, End);

        res.Body.AddRange(Body.AsReadOnlySpan());
        return(res);
    }
Esempio n. 2
0
        static AstBlockStatement MakeBlockStatement(AstStatement statement)
        {
            if (statement is AstBlockStatement blockStatement)
            {
                return(blockStatement);
            }
            var res = new AstBlockStatement(statement);

            res.Body.Add(statement);
            return(res);
        }