src/NFun/SyntaxParsing/SyntaxNodeReader.cs
/// <summary>
/// Read list of nodes separated by comma
/// </summary>
Read list of nodes separated by comma
Read list of nodes separated by comma
private static IList<ISyntaxNode> ReadNodeList(TokFlow flow) {
        var list = new List<ISyntaxNode>();
        int start = flow.Current.Start;
        do
        {
            var exp = ReadNodeOrNull(flow);
            if (exp != null)
                list.Add(exp);
            else if (list.Count > 0)
                throw ErrorFactory.ExpressionListMissed(start, flow.Position, list);
            else
                break;
        } while (flow.MoveIf(TokType.Sep, out _));
        return list;
    }
private static IList < ISyntaxNode > ReadNodeList ( TokFlow flow ) { var list = new List < ISyntaxNode > ( ) ; int start = flow . Current . Start ; do { var exp = ReadNodeOrNull ( flow ) ; if ( exp != null ) list . Add ( exp ) ; else if ( list . Count > 0 ) throw ErrorFactory . ExpressionListMissed ( start , flow . Position , list ) ; else break ; } while ( flow . MoveIf ( TokType . Sep , out _ ) ) ; return list ; }
Read list of nodes separated by comma
Read list of nodes separated by comma
flow
TokFlow