Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make local declaration syntax invalid #102

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>();
}
}
Loading