Skip to content

Commit

Permalink
Make local declaration syntax invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Mielek committed Feb 26, 2025
1 parent 4db0d36 commit eddf5c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/Core/Compiling/Diagnostics/CompilationErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public static class CompilationErrors
description: "Description.",
helpLinkUri: "TODO",
customTags: ["APIM", "ApiManagement"]);

public readonly static DiagnosticDescriptor ValueShouldBe = new(
"APIM9995",
"APIM9994",
"Value should be",
"Value for '{0}' policy should be '{1}' but is not",
"PolicyDocumentCompilation",
Expand All @@ -72,9 +72,9 @@ public static class CompilationErrors
description: "Description.",
helpLinkUri: "TODO",
customTags: ["APIM", "ApiManagement"]);

public readonly static DiagnosticDescriptor NotSupportedStatement = new(
"APIM9994",
"APIM9993",
"Not supported statement",
"Statement '{0}' is not supported in policy document",
"PolicyDocumentCompilation",
Expand All @@ -83,9 +83,9 @@ public static class CompilationErrors
description: "Description.",
helpLinkUri: "TODO",
customTags: ["APIM", "ApiManagement"]);

public readonly static DiagnosticDescriptor ExpressionNotSupported = new(
"APIM9993",
"APIM9992",
"Not supported expression",
"Expression of type '{0}' not supported in policy document. Only '{1}' is supported.",
"PolicyDocumentCompilation",
Expand All @@ -94,9 +94,9 @@ public static class CompilationErrors
description: "Description.",
helpLinkUri: "TODO",
customTags: ["APIM", "ApiManagement"]);

public readonly static DiagnosticDescriptor MethodNotSupported = new(
"APIM9992",
"APIM9991",
"Not supported method",
"Method '{0}' not supported in policy document",
"PolicyDocumentCompilation",
Expand Down
2 changes: 1 addition & 1 deletion src/Core/IoC/CompilerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static IServiceCollection AddSyntaxCompilers(this IServiceCollection serv
return services
.AddSingleton<BlockCompiler>()
.AddSingleton<ISyntaxCompiler, IfStatementCompiler>()
.AddSingleton<ISyntaxCompiler, LocalDeclarationStatementCompiler>()
// .AddSingleton<ISyntaxCompiler, LocalDeclarationStatementCompiler>()
.AddSingleton<ISyntaxCompiler, ExpressionStatementCompiler>();
}
}

0 comments on commit eddf5c4

Please sign in to comment.