Allow blank lines
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@99 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
parent
f21ffb934f
commit
c7d896b567
1 changed files with 24 additions and 21 deletions
|
@ -218,7 +218,9 @@ Demo.prototype.doCommand = function() {
|
||||||
this.gotoState(2 /* STATE_PROMPT */);
|
this.gotoState(2 /* STATE_PROMPT */);
|
||||||
var tokens = new Tokens(this.line);
|
var tokens = new Tokens(this.line);
|
||||||
this.line = '';
|
this.line = '';
|
||||||
var cmd = tokens.nextToken().toUpperCase();
|
var cmd = tokens.nextToken();
|
||||||
|
if (cmd != undefined) {
|
||||||
|
cmd = cmd.toUpperCase();
|
||||||
if (cmd.match(/^[0-9]+$/)) {
|
if (cmd.match(/^[0-9]+$/)) {
|
||||||
tokens.removeLineNumber();
|
tokens.removeLineNumber();
|
||||||
var lineNumber = parseInt(cmd);
|
var lineNumber = parseInt(cmd);
|
||||||
|
@ -243,6 +245,7 @@ Demo.prototype.doCommand = function() {
|
||||||
this.gotoState(5 /* STATE_EVAL */);
|
this.gotoState(5 /* STATE_EVAL */);
|
||||||
}
|
}
|
||||||
tokens.reset();
|
tokens.reset();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Demo.prototype.doEval = function() {
|
Demo.prototype.doEval = function() {
|
||||||
|
|
Loading…
Reference in a new issue