mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 02:57:52 -06:00
refactor: read c comments and calls through clex
This commit is contained in:
1 parent
9f8ac141c1
commit
e16caf57b4
6 files changed
+119
-217
No files matched your search
@@ -29,7 +29,8 @@ sys.path.insert(0, os.path.dirname(__file__))
|
||||
from core import upstream
|
||||
from core.cli import add_repo_inputs, require_directory
|
||||
from model.safeparse import yaml_load
|
||||
from scraper.mame_parser import MACHINE_MACROS, strip_comments
|
||||
from scraper.clex import blank_comments
|
||||
from scraper.mame_parser import MACHINE_MACROS
|
||||
|
||||
# An optional role word names the repository the lines are in.
|
||||
DRIVER_REF = re.compile(r"^(?:(source|upstream) )?(src/[\w./+-]+):(\d+)$")
|
||||
@@ -49,7 +50,7 @@ class Finding:
|
||||
|
||||
def declares(line: str, set_name: str) -> bool:
|
||||
"""Whether this line is the machine declaration of that set."""
|
||||
clean = strip_comments(line)
|
||||
clean = blank_comments(line)
|
||||
match = MACHINE_MACROS.search(clean)
|
||||
if not match:
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user