233 "IncludeInSyntaxCheck")) |
233 "IncludeInSyntaxCheck")) |
234 elif file in jsfiles: |
234 elif file in jsfiles: |
235 nok, fname, line, error = \ |
235 nok, fname, line, error = \ |
236 Utilities.jsCheckSyntax(file, source) |
236 Utilities.jsCheckSyntax(file, source) |
237 index = 0 |
237 index = 0 |
238 code = source.splitlines()[int(line) - 1] if nok else "" |
238 if nok: |
|
239 cline = min(len(source.splitlines()), int(line)) - 1 |
|
240 code = source.splitlines()[cline] |
|
241 else: |
|
242 code = "" |
239 else: |
243 else: |
240 isPy3 = True |
244 isPy3 = True |
241 nok, fname, line, index, code, error = \ |
245 nok, fname, line, index, code, error = \ |
242 Utilities.compile(file, source) |
246 Utilities.compile(file, source) |
243 if nok: |
247 if nok: |