From 1ed469db6e8499b48d1fe8bac2224743cf8f05bc Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Jan 2018 08:37:22 -0800 Subject: [PATCH] Add strict mode. --- .../Json/CSharpJsonParserTests_BasicTests.cs | 36 +++ .../CSharpTest/Json/CSharpJsonTests.cs | 4 +- .../Json/JsonParser.JsonNetSyntaxChecks.cs | 67 ++--- .../Json/JsonParser.StrictSyntaxChecker.cs | 261 ++++++++++++++++++ .../Core/Portable/Json/JsonParser.cs | 49 +++- .../Core/Portable/Json/JsonPatternDetector.cs | 44 +-- .../Portable/WorkspacesResources.Designer.cs | 90 ++++++ .../Core/Portable/WorkspacesResources.resx | 30 ++ .../Portable/xlf/WorkspacesResources.cs.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.de.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.es.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.fr.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.it.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.ja.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.ko.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.pl.xlf | 50 ++++ .../xlf/WorkspacesResources.pt-BR.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.ru.xlf | 50 ++++ .../Portable/xlf/WorkspacesResources.tr.xlf | 50 ++++ .../xlf/WorkspacesResources.zh-Hans.xlf | 50 ++++ .../xlf/WorkspacesResources.zh-Hant.xlf | 50 ++++ 21 files changed, 1158 insertions(+), 73 deletions(-) create mode 100644 src/Workspaces/Core/Portable/Json/JsonParser.StrictSyntaxChecker.cs diff --git a/src/Workspaces/CSharpTest/Json/CSharpJsonParserTests_BasicTests.cs b/src/Workspaces/CSharpTest/Json/CSharpJsonParserTests_BasicTests.cs index ef044146ded..79d60dfca4e 100644 --- a/src/Workspaces/CSharpTest/Json/CSharpJsonParserTests_BasicTests.cs +++ b/src/Workspaces/CSharpTest/Json/CSharpJsonParserTests_BasicTests.cs @@ -43,6 +43,42 @@ public void TestTwoSpaces() "); } + [Fact] + public void TestTabSpace() + { + Test(@"""\t""", @" + + + + + + + + + + + +"); + } + + [Fact] + public void TestFormFeed() + { + Test(@"""\f""", @" + + + + + \f + + + + + + +"); + } + [Fact] public void TestSingleLineComment() { diff --git a/src/Workspaces/CSharpTest/Json/CSharpJsonTests.cs b/src/Workspaces/CSharpTest/Json/CSharpJsonTests.cs index 0fc5b65ab6b..720ff55dbda 100644 --- a/src/Workspaces/CSharpTest/Json/CSharpJsonTests.cs +++ b/src/Workspaces/CSharpTest/Json/CSharpJsonTests.cs @@ -106,7 +106,7 @@ private void TryParseSubTrees(string stringText, bool runJsonNetCheck, bool runD return (token, null, allChars); } - var tree = JsonParser.TryParse(allChars); + var tree = JsonParser.TryParse(allChars, strict: false); return (token, tree, allChars); } @@ -207,7 +207,7 @@ private XElement TokenToElement(JsonToken token) private XElement TriviaToElement(JsonTrivia trivia) => new XElement( trivia.Kind.ToString(), - trivia.VirtualChars.CreateString()); + trivia.VirtualChars.CreateString().Replace("\f", "\\f")); private void CheckInvariants(JsonTree tree, ImmutableArray allChars) { diff --git a/src/Workspaces/Core/Portable/Json/JsonParser.JsonNetSyntaxChecks.cs b/src/Workspaces/Core/Portable/Json/JsonParser.JsonNetSyntaxChecks.cs index 1219363b9f2..380c9a9f04b 100644 --- a/src/Workspaces/Core/Portable/Json/JsonParser.JsonNetSyntaxChecks.cs +++ b/src/Workspaces/Core/Portable/Json/JsonParser.JsonNetSyntaxChecks.cs @@ -16,44 +16,24 @@ internal partial struct JsonParser { private partial struct JsonNetSyntaxChecker { - public JsonDiagnostic? Check(ImmutableArray text, JsonCompilationUnit root) - => CheckTopLevel(text, root) ?? CheckSyntax(root); - - private JsonDiagnostic? CheckTopLevel( - ImmutableArray text, JsonCompilationUnit compilationUnit) + private JsonDiagnostic? CheckChildren(JsonNode node) { - var arraySequence = compilationUnit.Sequence; - if (arraySequence.ChildCount == 0) - { - if (text.Length > 0 && - compilationUnit.EndOfFileToken.LeadingTrivia.All( - t => t.Kind == JsonKind.WhitespaceTrivia || t.Kind == JsonKind.EndOfLineTrivia)) - { - return new JsonDiagnostic(WorkspacesResources.Syntax_error, GetSpan(text)); - } - } - else if (arraySequence.ChildCount >= 2) - { - var firstToken = GetFirstToken(arraySequence.ChildAt(1).Node); - return new JsonDiagnostic( - string.Format(WorkspacesResources._0_unexpected, firstToken.VirtualChars[0].Char), - GetSpan(firstToken)); - } - foreach (var child in compilationUnit.Sequence) + foreach (var child in node) { - if (child.IsNode && child.Node.Kind == JsonKind.EmptyValue) + if (child.IsNode) { - var emptyValue = (JsonEmptyValueNode)child.Node; - return new JsonDiagnostic( - string.Format(WorkspacesResources._0_unexpected, ','), - GetSpan(emptyValue.CommaToken)); + var diagnostic = CheckSyntax(child.Node); + if (diagnostic != null) + { + return diagnostic; + } } } return null; } - private JsonDiagnostic? CheckSyntax(JsonNode node) + public JsonDiagnostic? CheckSyntax(JsonNode node) { switch (node.Kind) { @@ -62,6 +42,7 @@ private partial struct JsonNetSyntaxChecker case JsonKind.Constructor: return CheckConstructor((JsonConstructorNode)node); case JsonKind.Property: return CheckProperty((JsonPropertyNode)node); case JsonKind.Literal: return CheckLiteral((JsonLiteralNode)node); + case JsonKind.NegativeLiteral: return CheckNegativeLiteral((JsonNegativeLiteralNode)node); } return CheckChildren(node); @@ -77,6 +58,16 @@ private partial struct JsonNetSyntaxChecker return CheckChildren(node); } + private JsonDiagnostic? CheckNegativeLiteral(JsonNegativeLiteralNode node) + { + if (node.LiteralToken.Kind == JsonKind.NumberToken) + { + return CheckNumber(node.LiteralToken); + } + + return CheckChildren(node); + } + private JsonDiagnostic? CheckNumber(JsonToken numberToken) { var chars = numberToken.VirtualChars; @@ -121,24 +112,6 @@ private partial struct JsonNetSyntaxChecker return null; } - - private JsonDiagnostic? CheckChildren(JsonNode node) - { - foreach (var child in node) - { - if (child.IsNode) - { - var diagnostic = CheckSyntax(child.Node); - if (diagnostic != null) - { - return diagnostic; - } - } - } - - return null; - } - private JsonDiagnostic? CheckArray(JsonArrayNode node) { foreach (var child in node.Sequence) diff --git a/src/Workspaces/Core/Portable/Json/JsonParser.StrictSyntaxChecker.cs b/src/Workspaces/Core/Portable/Json/JsonParser.StrictSyntaxChecker.cs new file mode 100644 index 00000000000..3ab20fe0e69 --- /dev/null +++ b/src/Workspaces/Core/Portable/Json/JsonParser.StrictSyntaxChecker.cs @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + + +using System; +using System.Collections.Immutable; + +namespace Microsoft.CodeAnalysis.Json +{ + using System.Text.RegularExpressions; + using Microsoft.CodeAnalysis.VirtualChars; + using static JsonHelpers; + + internal partial struct JsonParser + { + private struct StrictSyntaxChecker + { + private JsonDiagnostic? CheckChildren(JsonNode node) + { + foreach (var child in node) + { + var diagnostic = child.IsNode ? CheckSyntax(child.Node) : CheckToken(child.Token); + if (diagnostic != null) + { + return diagnostic; + } + } + + return null; + } + + private JsonDiagnostic? CheckToken(JsonToken token) + => CheckTrivia(token.LeadingTrivia) ?? CheckTrivia(token.TrailingTrivia); + + private JsonDiagnostic? CheckTrivia(ImmutableArray triviaList) + { + foreach (var trivia in triviaList) + { + var diagnostic = CheckTrivia(trivia); + if (diagnostic != null) + { + return diagnostic; + } + } + + return null; + } + + private JsonDiagnostic? CheckTrivia(JsonTrivia trivia) + { + switch (trivia.Kind) + { + case JsonKind.MultiLineCommentTrivia: + case JsonKind.SingleLineCommentTrivia: + return new JsonDiagnostic( + WorkspacesResources.Comments_not_allowed, + GetSpan(trivia.VirtualChars)); + case JsonKind.WhitespaceTrivia: + return CheckWhitespace(trivia); + } + + return null; + } + + private JsonDiagnostic? CheckWhitespace(JsonTrivia trivia) + { + foreach (var ch in trivia.VirtualChars) + { + switch (ch) + { + case ' ': case '\t': + break; + + default: + return new JsonDiagnostic( + WorkspacesResources.Illegal_whitespace_character, + ch.Span); + } + } + + return null; + } + + public JsonDiagnostic? CheckSyntax(JsonNode node) + { + switch (node.Kind) + { + case JsonKind.Constructor: return CheckConstructor((JsonConstructorNode)node); + case JsonKind.Literal: return CheckLiteral((JsonLiteralNode)node); + case JsonKind.NegativeLiteral: return CheckNegativeLiteral((JsonNegativeLiteralNode)node); + case JsonKind.Property: return CheckProperty((JsonPropertyNode)node); + case JsonKind.Array: return CheckArray((JsonArrayNode)node); + case JsonKind.Object: return CheckObject((JsonObjectNode)node); + } + + return CheckChildren(node); + } + + private JsonDiagnostic? CheckObject(JsonObjectNode node) + { + var sequence = node.Sequence; + foreach (var child in sequence) + { + var childNode = child.Node; + if (childNode.Kind != JsonKind.Property && childNode.Kind != JsonKind.EmptyValue) + { + return new JsonDiagnostic( + WorkspacesResources.Only_properties_allowed_in_object, + GetSpan(GetFirstToken(childNode))); + } + } + + return CheckProperSeparation(sequence) ?? CheckChildren(node); + } + + private JsonDiagnostic? CheckArray(JsonArrayNode node) + { + foreach (var child in node.Sequence) + { + var childNode = child.Node; + if (childNode.Kind == JsonKind.Property) + { + return new JsonDiagnostic( + WorkspacesResources.Properties_not_allowed_in_array, + GetSpan(((JsonPropertyNode)childNode).ColonToken)); + } + } + + return CheckProperSeparation(node.Sequence) ?? CheckChildren(node); + } + + private JsonDiagnostic? CheckProperSeparation(JsonSequenceNode sequence) + { + for (int i = 0, n = sequence.ChildCount; i < n; i++) + { + var child = sequence.ChildAt(i).Node; + if (i % 2 == 0) + { + if (child.Kind == JsonKind.EmptyValue) + { + return new JsonDiagnostic( + string.Format(WorkspacesResources._0_unexpected, ","), + GetSpan(((JsonPropertyNode)child).ColonToken)); + } + } + else + { + if (child.Kind != JsonKind.EmptyValue) + { + return new JsonDiagnostic( + string.Format(WorkspacesResources._0_expected, ","), + GetSpan(GetFirstToken(child))); + } + } + } + + if (sequence.ChildCount != 0 && sequence.ChildCount % 2 == 0) + { + return new JsonDiagnostic( + WorkspacesResources.Trailing_comma_not_allowed, + GetSpan(sequence.ChildAt(sequence.ChildCount - 1).Node)); + } + + return null; + } + + private JsonDiagnostic? CheckProperty(JsonPropertyNode node) + { + if (node.NameToken.Kind != JsonKind.StringToken) + { + return new JsonDiagnostic( + WorkspacesResources.Property_name_must_be_a_string, + GetSpan(node.NameToken)); + } + + if (node.Value.Kind == JsonKind.EmptyValue) + { + return new JsonDiagnostic( + WorkspacesResources.Value_required, + GetSpan(((JsonEmptyValueNode)node.Value).CommaToken)); + } + + return null; + } + + private JsonDiagnostic? CheckLiteral(JsonLiteralNode node) + { + switch (node.Kind) + { + case JsonKind.NaNLiteralToken: + case JsonKind.InfinityLiteralToken: + case JsonKind.UndefinedLiteralToken: + return InvalidLiteral(node.LiteralToken); + case JsonKind.NumberToken: + return CheckNumber(node.LiteralToken); + case JsonKind.StringToken: + return CheckString(node.LiteralToken); + } + + return null; + } + + private static readonly Regex s_validNumberRegex = + new Regex(@"-?[0-9]*(\.[0-9]*)?([eE][-+]?[0-9]*)?", RegexOptions.Compiled); + + private JsonDiagnostic? CheckNumber(JsonToken literalToken) + { + var literalText = literalToken.VirtualChars.CreateString(); + if (!s_validNumberRegex.IsMatch(literalText)) + { + return new JsonDiagnostic( + WorkspacesResources.Invalid_number, + GetSpan(literalToken)); + } + + if (!double.TryParse(literalText, out var val) || + double.IsNaN(val) || + double.IsInfinity(val)) + { + return new JsonDiagnostic( + WorkspacesResources.Invalid_number, + GetSpan(literalToken)); + } + + return null; + } + + private JsonDiagnostic? CheckString(JsonToken literalToken) + { + if (literalToken.VirtualChars[0].Char == '\'') + { + return new JsonDiagnostic( + WorkspacesResources.Strings_must_start_with_double_quote_not_single_quote, + literalToken.VirtualChars[0].Span); + } + + return null; + } + + private JsonDiagnostic? InvalidLiteral(JsonToken literalToken) + { + return new JsonDiagnostic( + string.Format(WorkspacesResources._0_literal_not_allowed, literalToken.VirtualChars.CreateString()), + GetSpan(literalToken)); + } + + private JsonDiagnostic? CheckNegativeLiteral(JsonNegativeLiteralNode node) + { + return new JsonDiagnostic( + string.Format(WorkspacesResources._0_literal_not_allowed, "-Infinity"), + GetSpan(node)); + } + + private JsonDiagnostic? CheckConstructor(JsonConstructorNode node) + { + return new JsonDiagnostic( + WorkspacesResources.Constructors_not_allowed, + GetSpan(node.NewKeyword)); + } + } + } +} diff --git a/src/Workspaces/Core/Portable/Json/JsonParser.cs b/src/Workspaces/Core/Portable/Json/JsonParser.cs index 78f68c23a52..06292cc00b6 100644 --- a/src/Workspaces/Core/Portable/Json/JsonParser.cs +++ b/src/Workspaces/Core/Portable/Json/JsonParser.cs @@ -8,7 +8,7 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.CodeAnalysis.VirtualChars; using Roslyn.Utilities; - + namespace Microsoft.CodeAnalysis.Json { using System.Globalization; @@ -53,11 +53,11 @@ private JsonToken ConsumeCurrentToken() /// diagnotics. Parsing should always succeed, except in the case of the stack /// overflowing. /// - public static JsonTree TryParse(ImmutableArray text) + public static JsonTree TryParse(ImmutableArray text, bool strict) { try { - var tree1 = new JsonParser(text).ParseTree(); + var tree1 = new JsonParser(text).ParseTree(strict); return tree1; } catch (Exception e) when (StackGuard.IsInsufficientExecutionStackException(e)) @@ -66,7 +66,7 @@ public static JsonTree TryParse(ImmutableArray text) } } - private JsonTree ParseTree() + private JsonTree ParseTree(bool strict) { var arraySequence = this.ParseSequence(); Debug.Assert(_lexer.Position == _lexer.Text.Length); @@ -74,10 +74,12 @@ private JsonTree ParseTree() var root = new JsonCompilationUnit(arraySequence, _currentToken); - var diagnostic = GetDiagnostic(root); + var diagnostic = GetDiagnostic(root) ?? CheckTopLevel(_lexer.Text, root); if (diagnostic == null) { - diagnostic = new JsonNetSyntaxChecker().Check(_lexer.Text, root); + diagnostic = strict + ? new StrictSyntaxChecker().CheckSyntax(root) + : new JsonNetSyntaxChecker().CheckSyntax(root); } var diagnostics = diagnostic == null @@ -88,6 +90,40 @@ private JsonTree ParseTree() _lexer.Text, root, diagnostics); } + private JsonDiagnostic? CheckTopLevel( + ImmutableArray text, JsonCompilationUnit compilationUnit) + { + var arraySequence = compilationUnit.Sequence; + if (arraySequence.ChildCount == 0) + { + if (text.Length > 0 && + compilationUnit.EndOfFileToken.LeadingTrivia.All( + t => t.Kind == JsonKind.WhitespaceTrivia || t.Kind == JsonKind.EndOfLineTrivia)) + { + return new JsonDiagnostic(WorkspacesResources.Syntax_error, GetSpan(text)); + } + } + else if (arraySequence.ChildCount >= 2) + { + var firstToken = GetFirstToken(arraySequence.ChildAt(1).Node); + return new JsonDiagnostic( + string.Format(WorkspacesResources._0_unexpected, firstToken.VirtualChars[0].Char), + GetSpan(firstToken)); + } + foreach (var child in compilationUnit.Sequence) + { + if (child.IsNode && child.Node.Kind == JsonKind.EmptyValue) + { + var emptyValue = (JsonEmptyValueNode)child.Node; + return new JsonDiagnostic( + string.Format(WorkspacesResources._0_unexpected, ','), + GetSpan(emptyValue.CommaToken)); + } + } + + return null; + } + private static JsonToken GetFirstToken(JsonNode node) { foreach (var child in node) @@ -377,7 +413,6 @@ private JsonLiteralNode ParseLiteral(JsonToken textToken, JsonKind kind) private JsonValueNode ParseNumber(JsonToken textToken) { - var numberToken = textToken.With(kind: JsonKind.NumberToken); return new JsonLiteralNode(numberToken); } diff --git a/src/Workspaces/Core/Portable/Json/JsonPatternDetector.cs b/src/Workspaces/Core/Portable/Json/JsonPatternDetector.cs index a14a683edb6..f78abb606e1 100644 --- a/src/Workspaces/Core/Portable/Json/JsonPatternDetector.cs +++ b/src/Workspaces/Core/Portable/Json/JsonPatternDetector.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -109,57 +110,64 @@ public static bool IsDefinitelyNotJson(SyntaxToken token, ISyntaxFactsService sy return false; } - // if (!IsMethodArgument(token, syntaxFacts) && - // !HasJsonLanguageComment(token, syntaxFacts)) - // { - // return true; - // } - - // return false; - //} - private static bool HasJsonLanguageComment( - SyntaxToken token, ISyntaxFactsService syntaxFacts) + SyntaxToken token, ISyntaxFactsService syntaxFacts, out bool strict) { - if (HasJsonLanguageComment(token.GetPreviousToken().TrailingTrivia, syntaxFacts)) + if (HasJsonLanguageComment(token.GetPreviousToken().TrailingTrivia, syntaxFacts, out strict)) { return true; } for (var node = token.Parent; node != null; node = node.Parent) { - if (HasJsonLanguageComment(node.GetLeadingTrivia(), syntaxFacts)) + if (HasJsonLanguageComment(node.GetLeadingTrivia(), syntaxFacts, out strict)) { return true; } } + strict = false; return false; } private static bool HasJsonLanguageComment( - SyntaxTriviaList list, ISyntaxFactsService syntaxFacts) + SyntaxTriviaList list, ISyntaxFactsService syntaxFacts, out bool strict) { foreach (var trivia in list) { - if (HasJsonLanguageComment(trivia, syntaxFacts)) + if (HasJsonLanguageComment(trivia, syntaxFacts, out strict)) { return true; } } + strict = false; return false; } private static bool HasJsonLanguageComment( - SyntaxTrivia trivia, ISyntaxFactsService syntaxFacts) + SyntaxTrivia trivia, ISyntaxFactsService syntaxFacts, out bool strict) { + strict = false; if (syntaxFacts.IsRegularComment(trivia)) { var text = trivia.ToString(); var match = s_languageCommentDetector.Match(text); if (match.Success) { + var optionGroup = match.Groups["option"]; + foreach (Capture capture in optionGroup.Captures) + { + if (StringComparer.OrdinalIgnoreCase.Equals("strict", capture.Value)) + { + strict = true; + } + else + { + break; + } + } + return true; } } @@ -179,7 +187,7 @@ public bool IsDefinitelyJson(SyntaxToken token, CancellationToken cancellationTo return false; } - if (HasJsonLanguageComment(token, _syntaxFacts)) + if (HasJsonLanguageComment(token, _syntaxFacts, out _)) { return true; } @@ -226,13 +234,15 @@ public JsonTree TryParseJson(SyntaxToken token, CancellationToken cancellationTo return null; } + HasJsonLanguageComment(token, _syntaxFacts, out var strict); + var chars = _virtualCharService.TryConvertToVirtualChars(token); if (chars.IsDefaultOrEmpty) { return null; } - return JsonParser.TryParse(chars); + return JsonParser.TryParse(chars, strict); } private bool AnalyzeStringLiteral( diff --git a/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs b/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs index 89a96e381e9..6472f1d67e2 100644 --- a/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs +++ b/src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs @@ -151,6 +151,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to '{0}' literal not allowed. + /// + internal static string _0_literal_not_allowed { + get { + return ResourceManager.GetString("_0_literal_not_allowed", resourceCulture); + } + } + /// /// Looks up a localized string similar to "{0}" must be a non-null and non-empty string.. /// @@ -566,6 +575,24 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Comments not allowed. + /// + internal static string Comments_not_allowed { + get { + return ResourceManager.GetString("Comments_not_allowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Constructors not allowed. + /// + internal static string Constructors_not_allowed { + get { + return ResourceManager.GetString("Constructors_not_allowed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Could not find location to generation symbol into.. /// @@ -836,6 +863,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Illegal whitespace character. + /// + internal static string Illegal_whitespace_character { + get { + return ResourceManager.GetString("Illegal_whitespace_character", resourceCulture); + } + } + /// /// Looks up a localized string similar to Illegal {x,y} with x > y. /// @@ -1223,6 +1259,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Only properties allowed in object. + /// + internal static string Only_properties_allowed_in_object { + get { + return ResourceManager.GetString("Only_properties_allowed_in_object", resourceCulture); + } + } + /// /// Looks up a localized string similar to Options did not come from Workspace. /// @@ -1286,6 +1331,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Properties not allowed in array. + /// + internal static string Properties_not_allowed_in_array { + get { + return ResourceManager.GetString("Properties_not_allowed_in_array", resourceCulture); + } + } + /// /// Looks up a localized string similar to Property. /// @@ -1295,6 +1349,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Property name must be a string. + /// + internal static string Property_name_must_be_a_string { + get { + return ResourceManager.GetString("Property_name_must_be_a_string", resourceCulture); + } + } + /// /// Looks up a localized string similar to Property not allowed in a json array. /// @@ -1476,6 +1539,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Strings must start with " not '. + /// + internal static string Strings_must_start_with_double_quote_not_single_quote { + get { + return ResourceManager.GetString("Strings_must_start_with_double_quote_not_single_quote", resourceCulture); + } + } + /// /// Looks up a localized string similar to Struct. /// @@ -1746,6 +1818,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Trailing comma not allowed. + /// + internal static string Trailing_comma_not_allowed { + get { + return ResourceManager.GetString("Trailing_comma_not_allowed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Types. /// @@ -1872,6 +1953,15 @@ internal class WorkspacesResources { } } + /// + /// Looks up a localized string similar to Value required. + /// + internal static string Value_required { + get { + return ResourceManager.GetString("Value_required", resourceCulture); + } + } + /// /// Looks up a localized string similar to Value too large to be represented as a 30 bit unsigned integer.. /// diff --git a/src/Workspaces/Core/Portable/WorkspacesResources.resx b/src/Workspaces/Core/Portable/WorkspacesResources.resx index 91a5d05759b..cd48a83212f 100644 --- a/src/Workspaces/Core/Portable/WorkspacesResources.resx +++ b/src/Workspaces/Core/Portable/WorkspacesResources.resx @@ -751,4 +751,34 @@ Invalid constructor name + + Comments not allowed + + + Constructors not allowed + + + Illegal whitespace character + + + Only properties allowed in object + + + Properties not allowed in array + + + Property name must be a string + + + Strings must start with " not ' + + + Trailing comma not allowed + + + Value required + + + '{0}' literal not allowed + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf index d2022663915..a4174a26f66 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf index d4a35dc46b3..5278ff8da0b 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf index e8143649a95..5017acbc059 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf index 4bc6f3ab861..0a947fb337a 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf index ac2fd6c96ac..8eec337df8c 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf index 0faab951622..bb6af4b617b 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf index ebdfaa97328..fc53523e89a 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf index 69f70ef38b9..701ac6051fd 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf index 3d764c60870..0444bf8e2fc 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf index e28495bc4c3..ab416bbe8d9 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf index e6863945c9a..0fc95483031 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf index 1fac5e40006..30a6a535723 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf index bd44e086e32..e6dd98008f5 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf @@ -1027,6 +1027,56 @@ Invalid constructor name + + Comments not allowed + Comments not allowed + + + + Constructors not allowed + Constructors not allowed + + + + Illegal whitespace character + Illegal whitespace character + + + + Only properties allowed in object + Only properties allowed in object + + + + Properties not allowed in array + Properties not allowed in array + + + + Property name must be a string + Property name must be a string + + + + Strings must start with " not ' + Strings must start with " not ' + + + + Trailing comma not allowed + Trailing comma not allowed + + + + Value required + Value required + + + + '{0}' literal not allowed + '{0}' literal not allowed + + \ No newline at end of file -- GitLab