예제 #1
0
        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);
        }
예제 #2
0
        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;
예제 #4
0
 internal JsonIntegerLiteralSyntax(JsonValueWithBackgroundSyntax parent, GreenJsonIntegerLiteralSyntax green) : base(parent) => Green = green;
 private JsonBooleanLiteralSyntax(JsonValueWithBackgroundSyntax parent) : base(parent)
 {
 }
 internal True(JsonValueWithBackgroundSyntax parent) : base(parent)
 {
 }
예제 #7
0
 internal JsonUndefinedValueSyntax(JsonValueWithBackgroundSyntax parent, GreenJsonUndefinedValueSyntax green) : base(parent) => Green = green;