MCPcopy Index your code
hub / github.com/python/cpython / colorize_syntax_error

Method colorize_syntax_error

Lib/idlelib/editor.py:811–820  ·  view source on GitHub ↗
(self, text, pos)

Source from the content-addressed store, hash-verified

809 IDENTCHARS = string.ascii_letters + string.digits + "_"
810
811 def colorize_syntax_error(self, text, pos):
812 text.tag_add("ERROR", pos)
813 char = text.get(pos)
814 if char and char in self.IDENTCHARS:
815 text.tag_add("ERROR", pos + " wordstart", pos)
816 if '\n' == text.get(pos): # error at line end
817 text.mark_set("insert", pos)
818 else:
819 text.mark_set("insert", pos + "+1c")
820 text.see(pos)
821
822 def update_cursor_blink(self):
823 "Update the cursor blink configuration."

Callers 2

showsyntaxerrorMethod · 0.80
checksyntaxMethod · 0.80

Calls 4

tag_addMethod · 0.80
getMethod · 0.45
mark_setMethod · 0.45
seeMethod · 0.45

Tested by

no test coverage detected