summaryrefslogtreecommitdiff
path: root/cmd2/parsing.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-07-07 20:42:45 -0600
committerkotfu <kotfu@kotfu.net>2018-07-07 20:42:45 -0600
commita2f3ef3e689ef96fc31e1fc77613c2013b048c85 (patch)
tree54ce6528bfce16579b0f9dc33bc98b672b042334 /cmd2/parsing.py
parent9a6a2b2c25c19e82c661c7ca602f528312e89a62 (diff)
downloadcmd2-git-a2f3ef3e689ef96fc31e1fc77613c2013b048c85.tar.gz
Move LINE_FEED into constants
Diffstat (limited to 'cmd2/parsing.py')
-rw-r--r--cmd2/parsing.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/cmd2/parsing.py b/cmd2/parsing.py
index b220f1c4..aa913187 100644
--- a/cmd2/parsing.py
+++ b/cmd2/parsing.py
@@ -10,8 +10,6 @@ from typing import List, Tuple, Dict
from . import constants
from . import utils
-LINE_FEED = '\n'
-
class Statement(str):
"""String subclass with additional attributes to store the results of parsing.
@@ -272,8 +270,8 @@ class StatementParser:
# we have to do this before we tokenize because tokenizing
# destroys all unquoted whitespace in the input
terminator = None
- if line[-1:] == LINE_FEED:
- terminator = LINE_FEED
+ if line[-1:] == constants.LINE_FEED:
+ terminator = constants.LINE_FEED
command = None
args = None
@@ -301,7 +299,7 @@ class StatementParser:
break
if terminator:
- if terminator == LINE_FEED:
+ if terminator == constants.LINE_FEED:
terminator_pos = len(tokens)+1
# everything before the first terminator is the command and the args