From b362b8984cc79a87a00069210077fee32f3e157c Mon Sep 17 00:00:00 2001 From: makinde2013 Date: Wed, 2 Oct 2019 13:36:27 +0100 Subject: [PATCH] Added carriage return support to the symbols --- .gitignore | 3 ++- src/constants.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b3c6664..72f677f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store test.txt /node_modules -/coverage \ No newline at end of file +/coverage +.idea/ \ No newline at end of file diff --git a/src/constants.js b/src/constants.js index 687fa71..c3f7a1a 100644 --- a/src/constants.js +++ b/src/constants.js @@ -47,6 +47,7 @@ const SYMBOLS = { NEW_LINE: "\n", TAB_SPACE: "\t", EMPTY_SPACE: " ", + CARRIAGE_RETURN: "\r", EXCLAMATION_POINT: "!", PIPE: "|", COLON: ":", @@ -66,7 +67,7 @@ const LIST = { SYMBOLS.PIPE, SYMBOLS.BINARY_AND, SYMBOLS.ASSIGN, ], WHITESPACES: [ - SYMBOLS.EMPTY_SPACE, SYMBOLS.TAB_SPACE, SYMBOLS.NEW_LINE, + SYMBOLS.EMPTY_SPACE, SYMBOLS.TAB_SPACE, SYMBOLS.NEW_LINE, SYMBOLS.CARRIAGE_RETURN, ], KEYWORDS: [ KEYWORDS.JEKI, KEYWORDS.NIGBATI, KEYWORDS.SE, KEYWORDS.SOPE,