internal JsonListSyntax(JsonValueWithBackgroundSyntax parent, GreenJsonListSyntax green) : base(parent) { Green = green; SquareBracketOpen = new JsonSquareBracketOpenSyntax(this); int listItemNodeCount = green.ListItemNodes.Count; ListItemNodes = new SafeLazyObjectCollection <JsonMultiValueSyntax>( listItemNodeCount, index => new JsonMultiValueSyntax(this, index)); Commas = new SafeLazyObjectCollection <JsonCommaSyntax>( listItemNodeCount - 1, index => new JsonCommaSyntax(this, index)); SquareBracketClose = green.MissingSquareBracketClose ? Maybe <JsonSquareBracketCloseSyntax> .Nothing : new JsonSquareBracketCloseSyntax(this); FilteredListItemNodeCount = Green.FilteredListItemNodeCount; }
public override JsonValueSyntax VisitListSyntax(GreenJsonListSyntax green, JsonValueWithBackgroundSyntax parent) => new JsonListSyntax(parent, green);
public virtual TResult VisitListSyntax(GreenJsonListSyntax node, T arg) => DefaultVisit(node, arg);