Exemplo n.º 1
0
def default(in_):
    """
    Any input (character) satisfies this parser.
    """
    in_ = utils.translate_char(in_)
    return len(in_) == 1
Exemplo n.º 2
0
 def testAll(self):
     for (i, t) in enumerate(_tranlation_tests):
         input_, expected, msg = t
         self.assertEqual(translate_char(input_), expected, "{0} - {1}".format(i, msg))
Exemplo n.º 3
0
def one_char(in_):
    """
    Any input (character) satisfies this parser.
    """
    in_ = utils.translate_char(in_)
    return len(in_) == 1
Exemplo n.º 4
0
 def testAll(self):
     for (i, t) in enumerate(_tranlation_tests):
         input_, expected, msg = t
         self.assertEqual(translate_char(input_), expected,
                          "{0} - {1}".format(i, msg))
Exemplo n.º 5
0
 def run(self, key=None):
     state = State(self.window.active_view())
     if not state.user_input:
         state.user_input = utils.translate_char(key)
Exemplo n.º 6
0
 def run(self, key=None):
     state = State(self.window.active_view())
     if not state.user_input:
         state.user_input = utils.translate_char(key)
 def accept(self, key):
     self._inp += utils.translate_char(key)
     return True
Exemplo n.º 8
0
 def accept(self, key):
     self._inp += utils.translate_char(key)
     return True