myna.js
function seq() {
        var rules = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            rules[_i - 0] = arguments[_i];
        }
        var rs = rules.map(RuleTypeToRule);
        if (rs.length == 0)
            throw new Error("At least one rule is expected when calling `seq`");
        if (rs.length == 1)
            return rs[0];
        var rule1 = rs[0];
        var rule2 = seq.apply(void 0, rs.slice(1));
        if (rule1.nonAdvancing && rule2 instanceof Advance)
            return new AdvanceIf(rule1);
        else
            return new Sequence(rule1, rule2);
    }
function seq() {
        var rules = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            rules[_i - 0] = arguments[_i];
        }
        var rs = rules.map(RuleTypeToRule);
        if (rs.length == 0)
            throw new Error("At least one rule is expected when calling `seq`");
        if (rs.length == 1)
            return rs[0];
        var rule1 = rs[0];
        var rule2 = seq.apply(void 0, rs.slice(1));
        if (rule1.nonAdvancing && rule2 instanceof Advance)
            return new AdvanceIf(rule1);
        else
            return new Sequence(rule1, rule2);
    }
function seq ( ) { var rules = [ ] ; for ( var _i = 0 ; _i < arguments . length ; _i ++ ) { rules [ _i - 0 ] = arguments [ _i ] ; } var rs = rules . map ( RuleTypeToRule ) ; if ( rs . length == 0 ) throw new Error ( "At least one rule is expected when calling `seq`" ) ; if ( rs . length == 1 ) return rs [ 0 ] ; var rule1 = rs [ 0 ] ; var rule2 = seq . apply ( void 0 , rs . slice ( 1 ) ) ; if ( rule1 . nonAdvancing && rule2 instanceof Advance ) return new AdvanceIf ( rule1 ) ; else return new Sequence ( rule1 , rule2 ) ; }
Creates a rule that matches a series of rules in order, and succeeds if they all do
Creates a rule that matches a series of rules in order and succeeds if they all do