Advertisement
gr4ph0s

test

May 14th, 2018
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. import re
  2.  
  3.  
  4. class Class(object):
  5. def __init__(self, name):
  6. self.name = name
  7. self.functions = list()
  8. self.methods = list()
  9. self.attributes = list()
  10.  
  11.  
  12. class Type(object):
  13.  
  14. def __init__(self):
  15. self.regex = re.compile(r"")
  16. return
  17.  
  18. def Check(self, text):
  19. res = re.findall(self.regex, text)
  20.  
  21. return bool()
  22.  
  23.  
  24. class Function(Type):
  25.  
  26. def __init__(self):
  27. super().__init__()
  28. self.regex = re.compile(r"^\s*[.]{2}\s*function::\s*([a-zA-Z]*)\(.*\)$")
  29. return
  30.  
  31.  
  32. class Method(Type):
  33.  
  34. def __init__(self):
  35. super().__init__()
  36. self.regex = re.compile(r"^\s*[.]{2}\s*method::\s*([a-zA-Z]*).([a-zA-Z]*).*\)$")
  37. return
  38.  
  39.  
  40. class Attribute(Type):
  41.  
  42. def __init__(self):
  43. super().__init__()
  44. self.regex = re.compile(r"^\s*[.]{2}\s*attribute::\s*([a-zA-Z]*).([a-zA-Z]*)$")
  45. return
  46.  
  47.  
  48. typeList = [Function, Method, Attribute]
  49. classList = []
  50.  
  51.  
  52. filePath = r""
  53. with open(filePath, "r") as f:
  54. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement