lib/parser/statements/FunctionStatement.js
function FunctionStatement(name, args) {
    if (name[name.length - 1] === '$') {
        this.type = 'string';
        this.name = name.substring(0, name.length - 1);
    } else {
        this.type = 'number';
        this.name = name;
    }

    var positions = util.findPositions(args, [
        { 'start': '"', 'end': '"' },
        { 'start': '(', 'end': ')' }
    ]);
    var argList = util.splitOutside(args, ",", positions);

    this.args = [];
    for (var i = 0; i < argList.length; i++) {
        this.args.push(new statements.ExpressionStatement(argList[i].trim()));
    }
}
function FunctionStatement(name, args) {
    if (name[name.length - 1] === '$') {
        this.type = 'string';
        this.name = name.substring(0, name.length - 1);
    } else {
        this.type = 'number';
        this.name = name;
    }

    var positions = util.findPositions(args, [
        { 'start': '"', 'end': '"' },
        { 'start': '(', 'end': ')' }
    ]);
    var argList = util.splitOutside(args, ",", positions);

    this.args = [];
    for (var i = 0; i < argList.length; i++) {
        this.args.push(new statements.ExpressionStatement(argList[i].trim()));
    }
}
function FunctionStatement ( name , args ) { if ( name [ name . length - 1 ] === '$' ) { this . type = 'string' ; this . name = name . substring ( 0 , name . length - 1 ) ; } else { this . type = 'number' ; this . name = name ; } var positions = util . findPositions ( args , [ { 'start' : '"' , 'end' : '"' } , { 'start' : '(' , 'end' : ')' } ] ) ; var argList = util . splitOutside ( args , "," , positions ) ; this . args = [ ] ; for ( var i = 0 ; i < argList . length ; i ++ ) { this . args . push ( new statements . ExpressionStatement ( argList [ i ] . trim ( ) ) ) ; } }
Represents a function call

@param {String} name The name of the function
@param {String} args The arguments to the function
Represents a function call