-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the isSpace
utility function from core/parser.js to shared/util.js
#7389
Conversation
…l.js Currently the `isSpace` utility function is a member of `Lexer`, which seems suboptimal, given that it's placed in `core/parser.js`. In practice, this means that in a number of `core/*.js` files we thus have an *otherwise* completely unnecessary dependency on `core/parser.js` for a one-line function. Instead, this patch moves `isSpace` into `shared/util.js` which seems more appropriate for this kind of utility function. Not to mention that since all the affected `core/*.js` files already depends on `shared/util.js`, this doesn't incur any more file dependencies.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/20e762a38c90dc1/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/39cfb7eb7f0e431/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/20e762a38c90dc1/output.txt Total script time: 21.04 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/39cfb7eb7f0e431/output.txt Total script time: 28.12 mins
|
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/ec5961a378d5df3/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/ec5961a378d5df3/output.txt Total script time: 1.08 mins Published |
Good catch, thank you! |
Currently the
isSpace
utility function is a member ofLexer
, which seems suboptimal, given that it's placed incore/parser.js
. In practice, this means that in a number ofcore/*.js
files we thus have an otherwise completely unnecessary dependency oncore/parser.js
for a one-line function.Instead, this patch moves
isSpace
intoshared/util.js
which seems more appropriate for this kind of utility function. Not to mention that since all the affectedcore/*.js
files already depends onshared/util.js
, this doesn't incur any more file dependencies.