def check_syntax_highlighting(self):
        """Trigger syntax highlighting update, if suitable."""
        ### if the last frame when an edition was performed
        ### isn't stored (it is set to 0), it indicates
        ### that no changes were performed, so there is no
        ### point in updating the syntax highlighting data;
        ### therefore, we cancel the operation by returning
        if not self.last_edition_frame:
            return

        ### otherwise, there were changes, so we check
        ### wether the pre-defined number of frames between the last
        ### change and the present frame has passed by;
        ###
        ### if such number already went by, we reset the
        ### last_edition_frame to 0, then update the syntax
        ### highlighting and apply it in the visible lines

        if GENERAL_NS.frame_index - self.last_edition_frame > FRAMES_TO_UPDATE_SYNTAX:

            self.last_edition_frame = 0

            self.update_syntax_highlight_data()
            self.syntax_highlight_visible_lines()
Trigger syntax highlighting update, if suitable.
nodezator/textman/editor/cursor/syntaxhigh.py