equal
deleted
inserted
replaced
76 |
76 |
77 Ignores tokens that are not strings. Assumes bounds checking has |
77 Ignores tokens that are not strings. Assumes bounds checking has |
78 already been done. |
78 already been done. |
79 |
79 |
80 """ |
80 """ |
81 st = tokens[j] |
81 k = j |
82 if st.type == token.STRING and st.string.startswith(("'", '"')): |
82 currtoken = tokens[k] |
83 sysstrtokens.add(st) |
83 while currtoken.type in (token.STRING, token.NEWLINE, tokenize.NL): |
|
84 k += 1 |
|
85 if ( |
|
86 currtoken.type == token.STRING |
|
87 and currtoken.string.startswith(("'", '"')) |
|
88 ): |
|
89 sysstrtokens.add(currtoken) |
|
90 try: |
|
91 currtoken = tokens[k] |
|
92 except IndexError: |
|
93 break |
84 |
94 |
85 coldelta = 0 # column increment for new opening parens |
95 coldelta = 0 # column increment for new opening parens |
86 coloffset = -1 # column offset for the current line (-1: TBD) |
96 coloffset = -1 # column offset for the current line (-1: TBD) |
87 parens = [(0, 0, 0)] # stack of (line, end-column, column-offset) |
97 parens = [(0, 0, 0)] # stack of (line, end-column, column-offset) |
88 for i, t in enumerate(tokens): |
98 for i, t in enumerate(tokens): |