# Path: ifj2017/ide/settings.py
# EXPRESSION_SPLITTERS = set(" \n\t")


import re
import inspect
from typing import Optional, Tuple, List, Dict
from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty, pyqtSlot, QVariant
from PyQt5.QtQuick import QQuickItem
from ifj2017.ide.settings import EXPRESSION_SPLITTERS

    def _get_content(self):
        return self._target.property("text")

    def _get_cursor(self):
        return self._target.property("cursorPosition")

    def _get_selection(self):
        return (self._target.property("selectionStart"),
                self._target.property("selectionEnd"),
                self._target.property("selectedText"))

    @pyqtSlot(result=QVariant)
    def currentWordBorders(self) -> QVariant:
        return QVariant(self._currentWordBorders())

    def _currentWordBorders(self) -> Dict[str, int]:
        """
        :return: Current word start and end
        """

        content = self._get_content()
        cursor = self._get_cursor()
        word_start = 0
        word_end = len(content)

        if self._get_cursor() == 0:
            return {"start": -1, "end": -1}

        splitter_positions = list()

# Path: ifj2017/ide/settings.py
# EXPRESSION_SPLITTERS = set(" \n\t")


# Path: ifj2017/ide/code/expression/exp_analyzer.py
import re
import inspect
from typing import Optional, Tuple, List, Dict
from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty, pyqtSlot, QVariant
from PyQt5.QtQuick import QQuickItem
from ifj2017.ide.settings import EXPRESSION_SPLITTERS


    def _get_content(self):
        return self._target.property("text")

    def _get_cursor(self):
        return self._target.property("cursorPosition")

    def _get_selection(self):
        return (self._target.property("selectionStart"),
                self._target.property("selectionEnd"),
                self._target.property("selectedText"))

    @pyqtSlot(result=QVariant)
    def currentWordBorders(self) -> QVariant:
        return QVariant(self._currentWordBorders())

    def _currentWordBorders(self) -> Dict[str, int]:
        """
        :return: Current word start and end
        """

        content = self._get_content()
        cursor = self._get_cursor()
        word_start = 0
        word_end = len(content)

        if self._get_cursor() == 0:
            return {"start": -1, "end": -1}

        splitter_positions = list()

        for splitter in EXPRESSION_SPLITTERS: