lib/parser/commands/InputCommand.js
function InputCommand(args) {
    var parsed = new statements.ArgumentStatement(args);
    if (!parsed.args.length) throw new SyntaxError('INPUT requires at least one argument');

    var question = "", placeVar, file;
    if (parsed.args.length === 1) placeVar = parsed.args[0];
    else {
        if (parsed.args[0].child instanceof statements.PointerStatement) file = parsed.args[0];
        else question = parsed.args[0];

        placeVar = parsed.args[1];
    }

    if (!(placeVar.child instanceof statements.VariableStatement || placeVar.child instanceof statements.FunctionStatement))
        throw new SyntaxError('Expected variable');

    this.file = file;
    this.question = question;
    this.placeVar = placeVar;
}
function InputCommand(args) {
    var parsed = new statements.ArgumentStatement(args);
    if (!parsed.args.length) throw new SyntaxError('INPUT requires at least one argument');

    var question = "", placeVar, file;
    if (parsed.args.length === 1) placeVar = parsed.args[0];
    else {
        if (parsed.args[0].child instanceof statements.PointerStatement) file = parsed.args[0];
        else question = parsed.args[0];

        placeVar = parsed.args[1];
    }

    if (!(placeVar.child instanceof statements.VariableStatement || placeVar.child instanceof statements.FunctionStatement))
        throw new SyntaxError('Expected variable');

    this.file = file;
    this.question = question;
    this.placeVar = placeVar;
}
function InputCommand ( args ) { var parsed = new statements . ArgumentStatement ( args ) ; if ( ! parsed . args . length ) throw new SyntaxError ( 'INPUT requires at least one argument' ) ; var question = "" , placeVar , file ; if ( parsed . args . length === 1 ) placeVar = parsed . args [ 0 ] ; else { if ( parsed . args [ 0 ] . child instanceof statements . PointerStatement ) file = parsed . args [ 0 ] ; else question = parsed . args [ 0 ] ; placeVar = parsed . args [ 1 ] ; } if ( ! ( placeVar . child instanceof statements . VariableStatement || placeVar . child instanceof statements . FunctionStatement ) ) throw new SyntaxError ( 'Expected variable' ) ; this . file = file ; this . question = question ; this . placeVar = placeVar ; }
Inputs a line from the user

@param {String} args The arguments to the command
@constructor
Inputs a line from the user