提交 1ed469db 编写于 作者: C Cyrus Najmabadi

Add strict mode.

上级 50c39799
......@@ -43,6 +43,42 @@ public void TestTwoSpaces()
</Tree>");
}
[Fact]
public void TestTabSpace()
{
Test(@"""\t""", @"<Tree>
<CompilationUnit>
<Sequence />
<EndOfFile>
<Trivia>
<WhitespaceTrivia> </WhitespaceTrivia>
</Trivia>
</EndOfFile>
</CompilationUnit>
<Diagnostics>
<Diagnostic Message=""Syntax error"" Start=""9"" Length=""2"" />
</Diagnostics>
</Tree>");
}
[Fact]
public void TestFormFeed()
{
Test(@"""\f""", @"<Tree>
<CompilationUnit>
<Sequence />
<EndOfFile>
<Trivia>
<WhitespaceTrivia>\f</WhitespaceTrivia>
</Trivia>
</EndOfFile>
</CompilationUnit>
<Diagnostics>
<Diagnostic Message=""Syntax error"" Start=""9"" Length=""2"" />
</Diagnostics>
</Tree>");
}
[Fact]
public void TestSingleLineComment()
{
......
......@@ -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<VirtualChar> allChars)
{
......
......@@ -16,44 +16,24 @@ internal partial struct JsonParser
{
private partial struct JsonNetSyntaxChecker
{
public JsonDiagnostic? Check(ImmutableArray<VirtualChar> text, JsonCompilationUnit root)
=> CheckTopLevel(text, root) ?? CheckSyntax(root);
private JsonDiagnostic? CheckTopLevel(
ImmutableArray<VirtualChar> 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)
......
// 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<JsonTrivia> 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));
}
}
}
}
......@@ -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.
/// </summary>
public static JsonTree TryParse(ImmutableArray<VirtualChar> text)
public static JsonTree TryParse(ImmutableArray<VirtualChar> 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<VirtualChar> 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<VirtualChar> 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);
}
......
// 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(
......
......@@ -151,6 +151,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos; literal not allowed.
/// </summary>
internal static string _0_literal_not_allowed {
get {
return ResourceManager.GetString("_0_literal_not_allowed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &quot;{0}&quot; must be a non-null and non-empty string..
/// </summary>
......@@ -566,6 +575,24 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Comments not allowed.
/// </summary>
internal static string Comments_not_allowed {
get {
return ResourceManager.GetString("Comments_not_allowed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Constructors not allowed.
/// </summary>
internal static string Constructors_not_allowed {
get {
return ResourceManager.GetString("Constructors_not_allowed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Could not find location to generation symbol into..
/// </summary>
......@@ -836,6 +863,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Illegal whitespace character.
/// </summary>
internal static string Illegal_whitespace_character {
get {
return ResourceManager.GetString("Illegal_whitespace_character", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Illegal {x,y} with x &gt; y.
/// </summary>
......@@ -1223,6 +1259,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Only properties allowed in object.
/// </summary>
internal static string Only_properties_allowed_in_object {
get {
return ResourceManager.GetString("Only_properties_allowed_in_object", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Options did not come from Workspace.
/// </summary>
......@@ -1286,6 +1331,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Properties not allowed in array.
/// </summary>
internal static string Properties_not_allowed_in_array {
get {
return ResourceManager.GetString("Properties_not_allowed_in_array", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Property.
/// </summary>
......@@ -1295,6 +1349,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Property name must be a string.
/// </summary>
internal static string Property_name_must_be_a_string {
get {
return ResourceManager.GetString("Property_name_must_be_a_string", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Property not allowed in a json array.
/// </summary>
......@@ -1476,6 +1539,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Strings must start with &quot; not &apos;.
/// </summary>
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);
}
}
/// <summary>
/// Looks up a localized string similar to Struct.
/// </summary>
......@@ -1746,6 +1818,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Trailing comma not allowed.
/// </summary>
internal static string Trailing_comma_not_allowed {
get {
return ResourceManager.GetString("Trailing_comma_not_allowed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Types.
/// </summary>
......@@ -1872,6 +1953,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Value required.
/// </summary>
internal static string Value_required {
get {
return ResourceManager.GetString("Value_required", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Value too large to be represented as a 30 bit unsigned integer..
/// </summary>
......
......@@ -751,4 +751,34 @@
<data name="Invalid_constructor_name" xml:space="preserve">
<value>Invalid constructor name</value>
</data>
<data name="Comments_not_allowed" xml:space="preserve">
<value>Comments not allowed</value>
</data>
<data name="Constructors_not_allowed" xml:space="preserve">
<value>Constructors not allowed</value>
</data>
<data name="Illegal_whitespace_character" xml:space="preserve">
<value>Illegal whitespace character</value>
</data>
<data name="Only_properties_allowed_in_object" xml:space="preserve">
<value>Only properties allowed in object</value>
</data>
<data name="Properties_not_allowed_in_array" xml:space="preserve">
<value>Properties not allowed in array</value>
</data>
<data name="Property_name_must_be_a_string" xml:space="preserve">
<value>Property name must be a string</value>
</data>
<data name="Strings_must_start_with_double_quote_not_single_quote" xml:space="preserve">
<value>Strings must start with " not '</value>
</data>
<data name="Trailing_comma_not_allowed" xml:space="preserve">
<value>Trailing comma not allowed</value>
</data>
<data name="Value_required" xml:space="preserve">
<value>Value required</value>
</data>
<data name="_0_literal_not_allowed" xml:space="preserve">
<value>'{0}' literal not allowed</value>
</data>
</root>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1027,6 +1027,56 @@
<target state="new">Invalid constructor name</target>
<note />
</trans-unit>
<trans-unit id="Comments_not_allowed">
<source>Comments not allowed</source>
<target state="new">Comments not allowed</target>
<note />
</trans-unit>
<trans-unit id="Constructors_not_allowed">
<source>Constructors not allowed</source>
<target state="new">Constructors not allowed</target>
<note />
</trans-unit>
<trans-unit id="Illegal_whitespace_character">
<source>Illegal whitespace character</source>
<target state="new">Illegal whitespace character</target>
<note />
</trans-unit>
<trans-unit id="Only_properties_allowed_in_object">
<source>Only properties allowed in object</source>
<target state="new">Only properties allowed in object</target>
<note />
</trans-unit>
<trans-unit id="Properties_not_allowed_in_array">
<source>Properties not allowed in array</source>
<target state="new">Properties not allowed in array</target>
<note />
</trans-unit>
<trans-unit id="Property_name_must_be_a_string">
<source>Property name must be a string</source>
<target state="new">Property name must be a string</target>
<note />
</trans-unit>
<trans-unit id="Strings_must_start_with_double_quote_not_single_quote">
<source>Strings must start with " not '</source>
<target state="new">Strings must start with " not '</target>
<note />
</trans-unit>
<trans-unit id="Trailing_comma_not_allowed">
<source>Trailing comma not allowed</source>
<target state="new">Trailing comma not allowed</target>
<note />
</trans-unit>
<trans-unit id="Value_required">
<source>Value required</source>
<target state="new">Value required</target>
<note />
</trans-unit>
<trans-unit id="_0_literal_not_allowed">
<source>'{0}' literal not allowed</source>
<target state="new">'{0}' literal not allowed</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册