feat: add ast_checker mappings for Python3 and C

This commit is contained in:
2026-05-25 20:35:56 -06:00
parent 9c6c8c6406
commit 3b4dfe2fe2
4 changed files with 121 additions and 0 deletions

39
ast_checker/mappings/c.py Normal file
View File

@@ -0,0 +1,39 @@
C_MAPPING = {
"for_loop": "for_statement",
"while_loop": "while_statement",
"do_while": "do_statement",
"if_statement": "if_statement",
"else_clause": "else_clause",
"break": "break_statement",
"continue": "continue_statement",
"function_definition": "function_definition",
"return": "return_statement",
"switch_statement": "switch_statement",
"case_statement": "case_statement",
"assignment": "assignment_expression",
"struct": "struct_specifier",
"include": "preproc_include",
"+": "+",
"-": "-",
"*": "*",
"/": "/",
"%": "%",
"+=": "+=",
"-=": "-=",
"*=": "*=",
"/=": "/=",
"%=": "%=",
"==": "==",
"!=": "!=",
">": ">",
">=": ">=",
"<": "<",
"<=": "<=",
"and": "&&",
"or": "||",
"not": "!",
"&": "&",
"|": "|",
"++": "++",
"--": "--",
}