Initial commit

This commit is contained in:
2020-01-30 22:31:36 +01:00
commit d4b4be940c
23 changed files with 1694 additions and 0 deletions

12
pjvm/utils.py Normal file
View File

@@ -0,0 +1,12 @@
from typing import List
import re
re_types = re.compile('([BCDFIJSZV]|L(?:[a-zA-Z0-9_]+/)+[a-zA-Z0-9_]+;)')
re_method_sig = re.compile(fr"\(({re_types.pattern}*)\){re_types.pattern}")
def get_argument_count_types_descriptor(descriptor: str) -> List[str]:
args = re_method_sig.search(descriptor).group(1)
return re_types.findall(args)