nl_tokens: A Mixin definition with a list of parameters . rounded (
pl_tokens: function ( ) { var name , params = [ ] , match , ruleset , cond , variadic = false ; if ( ( parserInput . currentChar ( ) !== '.' && parserInput . currentChar ( ) !== '#' ) || parserInput . peek ( / ^[^{]*\} / ) ) { return ; } parserInput . save ( ) ; match = parserInput . $re ( / ^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\( / ) ; if ( match ) { name = match [ 1 ] ; var argInfo = this . args ( <mask> ) ; params = argInfo . args ; variadic = argInfo . variadic ; // .mixincall("@{a}"); // looks a bit like a mixin definition.. // also // .mixincall(@a: {rule: set;}); // so we have to be nice and restore if ( ! parserInput . $char ( ')' ) ) { parserInput . restore ( 'Missing closing \')\'' ) ; return ; } parserInput . commentStore . length = 0 ; if ( parserInput . $str ( 'when' ) ) { // Guard cond = expect ( parsers . conditions , 'expected condition' ) ; } ruleset = parsers . block ( ) ; if ( ruleset ) { parserInput . forget ( ) ; return new ( tree . mixin . Definition ) ( name , params , ruleset , cond , variadic ) ; } else { parserInput . restore ( ) ; } } else { parserInput . forget ( ) ; } }