8206:adf11836cfce | 8207:d359172d11be |
---|---|
29 DEDENT = token.DEDENT | 29 DEDENT = token.DEDENT |
30 NEWLINE = token.NEWLINE | 30 NEWLINE = token.NEWLINE |
31 EMPTY = tokenize.NL | 31 EMPTY = tokenize.NL |
32 | 32 |
33 | 33 |
34 class Token(object): | 34 class Token: |
35 """ | 35 """ |
36 Class to store the token related infos. | 36 Class to store the token related infos. |
37 """ | 37 """ |
38 def __init__(self, **kw): | 38 def __init__(self, **kw): |
39 """ | 39 """ |
42 @keyparam **kw list of key, value pairs | 42 @keyparam **kw list of key, value pairs |
43 """ | 43 """ |
44 self.__dict__.update(kw) | 44 self.__dict__.update(kw) |
45 | 45 |
46 | 46 |
47 class Parser(object): | 47 class Parser: |
48 """ | 48 """ |
49 Class used to parse the source code of a Python file. | 49 Class used to parse the source code of a Python file. |
50 """ | 50 """ |
51 def parse(self, text): | 51 def parse(self, text): |
52 """ | 52 """ |
100 col=scol, line=line)) | 100 col=scol, line=line)) |
101 | 101 |
102 spacer = ' ' | 102 spacer = ' ' |
103 | 103 |
104 | 104 |
105 class SourceStat(object): | 105 class SourceStat: |
106 """ | 106 """ |
107 Class used to calculate and store the source code statistics. | 107 Class used to calculate and store the source code statistics. |
108 """ | 108 """ |
109 def __init__(self): | 109 def __init__(self): |
110 """ | 110 """ |