Exemple #1
0
        private IReq <ArrayNode> Array(Token lbrac)
        {
            var value = this.ArrayValue(out var emptyArrayComments);

            return(this.input.Expect(t => t.Type == TokenType.RBrac)
                   .CreateNode(
                       onSuccess: rbrac => ArrayNode.Create(lbrac, value, rbrac, emptyArrayComments, this.AppComment()).Req(),
                       onError: ue => SyntaxErrorNode.Unexpected("Expected array close tag ']'", ue)));
        }
Exemple #2
0
        CreationType INode.CreateViaPullDescend <CreationType, TNodes>(ref TNodes nodes)
        {
            if (_array.Length == 0)
            {
                return(EmptyNode.Create <TSource, TNodes, CreationType>(ref nodes));
            }

            return(ArrayNode.Create <TSource, TNodes, CreationType>(_array, ref nodes));
        }