mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
added list of tests
This commit is contained in:
@ -10,18 +10,18 @@ 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)
|
||||
# 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)
|
||||
|
||||
def extract_enums(lines):
|
||||
line_iter = iter(lines)
|
||||
|
Reference in New Issue
Block a user