Skip to content

Commit 38f2fb3

Browse files
fix: Escape "Google" as a keyword.
1 parent 61a56a5 commit 38f2fb3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Google.Api.Generator.Utils/Roslyn/Keywords.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@ public static class Keywords
9797
"virtual",
9898
"void",
9999
"volatile",
100-
"while"
100+
"while",
101+
102+
// Not actually keywords, but represent special reserved names in the generated libraries that should be escaped like keywords.
103+
"Google",
104+
"google",
105+
"Service",
106+
"service"
101107
);
102108

103109
public static string PrependAtIfKeyword(string word) => IsKeyword(word) ? $"@{word}" : word;

0 commit comments

Comments
 (0)