Skip to content

Commit c1ab16b

Browse files
committed
Changed CCodeGenerator reserved keyword checking helpers to be static.
1 parent aa73692 commit c1ab16b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Generator/Generators/C/CCodeGenerator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public override bool VisitFieldDecl(Field field)
276276
"_Thread_local", "__func__", "__objc_yes", "__objc_no",
277277
};
278278

279-
public bool IsReservedKeywordC(string id) => CReservedKeywords.Contains(id);
279+
public static bool IsReservedKeywordC(string id) => CReservedKeywords.Contains(id);
280280

281281
static readonly List<string> CppReservedKeywords = new List<string> {
282282
// C++ 2.11p1: Keywords.
@@ -293,8 +293,8 @@ public override bool VisitFieldDecl(Field field)
293293
"thread_local"
294294
};
295295

296-
public bool IsReservedKeywordCpp(string id) => CppReservedKeywords.Contains(id);
296+
public static bool IsReservedKeywordCpp(string id) => CppReservedKeywords.Contains(id);
297297

298-
public bool IsReservedKeyword(string id) => IsReservedKeywordC(id) || IsReservedKeywordCpp(id);
298+
public static bool IsReservedKeyword(string id) => IsReservedKeywordC(id) || IsReservedKeywordCpp(id);
299299
}
300300
}

0 commit comments

Comments
 (0)