autogen enums

This commit is contained in:
Erik Frojdh
2020-01-23 11:45:33 +01:00
parent a9e375ed34
commit dd84337ef3
2 changed files with 7 additions and 13 deletions

View File

@ -9,19 +9,7 @@ enums.cpp
import re
import subprocess
# def remove_comments(text):
# def replacer(match):
# s = match.group(0)
# if s.startswith('/'):
# return " " # note: a space and not an empty string
# else:
# return s
# pattern = re.compile(
# r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
# re.DOTALL | re.MULTILINE
# )
# return re.sub(pattern, replacer, text)
from parse import remove_comments
def extract_enums(lines):
line_iter = iter(lines)