internal JsonMapSyntax(JsonValueWithBackgroundSyntax parent, GreenJsonMapSyntax green) : base(parent) { Green = green; CurlyOpen = new JsonCurlyOpenSyntax(this); int keyValueNodeCount = green.KeyValueNodes.Count; KeyValueNodes = new SafeLazyObjectCollection <JsonKeyValueSyntax>( keyValueNodeCount, index => new JsonKeyValueSyntax(this, index)); Commas = new SafeLazyObjectCollection <JsonCommaSyntax>( keyValueNodeCount - 1, index => new JsonCommaSyntax(this, index)); CurlyClose = green.MissingCurlyClose ? Maybe <JsonCurlyCloseSyntax> .Nothing : new JsonCurlyCloseSyntax(this); }
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; }
internal JsonErrorStringSyntax(JsonValueWithBackgroundSyntax parent, GreenJsonErrorStringSyntax green) : base(parent) => Green = green;
internal JsonIntegerLiteralSyntax(JsonValueWithBackgroundSyntax parent, GreenJsonIntegerLiteralSyntax green) : base(parent) => Green = green;
private JsonBooleanLiteralSyntax(JsonValueWithBackgroundSyntax parent) : base(parent) { }
internal True(JsonValueWithBackgroundSyntax parent) : base(parent) { }
internal JsonUndefinedValueSyntax(JsonValueWithBackgroundSyntax parent, GreenJsonUndefinedValueSyntax green) : base(parent) => Green = green;