Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- class Class(object):
- def __init__(self, name):
- self.name = name
- self.functions = list()
- self.methods = list()
- self.attributes = list()
- class Type(object):
- def __init__(self):
- self.regex = re.compile(r"")
- return
- def Check(self, text):
- res = re.findall(self.regex, text)
- return bool()
- class Function(Type):
- def __init__(self):
- super().__init__()
- self.regex = re.compile(r"^\s*[.]{2}\s*function::\s*([a-zA-Z]*)\(.*\)$")
- return
- class Method(Type):
- def __init__(self):
- super().__init__()
- self.regex = re.compile(r"^\s*[.]{2}\s*method::\s*([a-zA-Z]*).([a-zA-Z]*).*\)$")
- return
- class Attribute(Type):
- def __init__(self):
- super().__init__()
- self.regex = re.compile(r"^\s*[.]{2}\s*attribute::\s*([a-zA-Z]*).([a-zA-Z]*)$")
- return
- typeList = [Function, Method, Attribute]
- classList = []
- filePath = r""
- with open(filePath, "r") as f:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement