Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
reorganize code
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermooo committed Sep 22, 2012
1 parent 13ececf commit 7552322
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
3 changes: 2 additions & 1 deletion ex_command_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
('ls', 'ls'): ex_cmd_data(
command='ex_prompt_select_open_file',
invocations=(),
error_on=(ex_error.ERR_TRAILING_CHARS,)
error_on=(ex_error.ERR_TRAILING_CHARS,
ex_error.ERR_NO_RANGE_ALLOWED,)
),
('registers', 'reg'): ex_cmd_data(
command='ex_list_registers',
Expand Down
4 changes: 2 additions & 2 deletions ex_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import ex_error
import ex_range
import shell
from vex import substitute
from vex import global_command
from vex.parsers import global_command
from vex.parsers import substitute
from vex.parsers import rangeparser

GLOBAL_RANGES = []
Expand Down
6 changes: 5 additions & 1 deletion tests/test_global.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from vex.global_command import GlobalLexer
from vex.parsers.global_command import GlobalLexer


class TestGlobalLexer(unittest.TestCase):
Expand All @@ -22,3 +22,7 @@ def testCanEscapeCharactersInSearchPattern(self):
def testCanEscapeBackSlashes(self):
actual = self.lexer.parse(r'/\\/p#')
self.assertEqual(actual, ['\\', 'p#'])


if __name__ == '__main__':
unittest.main()
8 changes: 4 additions & 4 deletions tests/test_substitute.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest

from vex.substitute import SubstituteLexer
from vex.parsing import RegexToken
from vex.parsing import Lexer
from vex.parsing import EOF
from vex.parsers.substitute import SubstituteLexer
from vex.parsers.parsing import RegexToken
from vex.parsers.parsing import Lexer
from vex.parsers.parsing import EOF


class TestRegexToken(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions vex/global_command.py → vex/parsers/global_command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from vex.parsing import RegexToken
from vex.parsing import Lexer
from vex.parsing import EOF
from vex.parsers.parsing import RegexToken
from vex.parsers.parsing import Lexer
from vex.parsers.parsing import EOF


class GlobalLexer(Lexer):
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions vex/substitute.py → vex/parsers/substitute.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from vex.parsing import RegexToken
from vex.parsing import Lexer
from vex.parsing import EOF
from vex.parsers.parsing import RegexToken
from vex.parsers.parsing import Lexer
from vex.parsers.parsing import EOF


class SubstituteLexer(Lexer):
Expand Down

0 comments on commit 7552322

Please sign in to comment.