
.function {
    // don't remove `;` they are critical here
    // (may affect actual type returned by the parser)
    .color-hex()     {return: #123;}
    .color-keyword() {return: red;}
    .number()        {return: 42%;}
    .keyword()       {return: identifier;}
    
    .list() {
        return: red, 1.2  3px   4% ,5 boo! identifier ;
    }

    .saturn(@color, @depth) {
        return: desaturate(@color, sqrt(@depth));
    }

    .rgba(@r, @g, @b, @a) {
        return: overriden rgba @r @g @b @a;
    }

    .rgbb(@r, @g, @b, @a) {
        return: rgbb @r @g @b @a;
    }
}

misc {

    1: iscolor(color-hex());
    2: iscolor(color-keyword());
    3: isnumber(number());
    4: iskeyword(keyword());
    
    5: list();
    6: iscolor(extract(extract(list(), 1), 1));
    7: isnumber(extract(extract(list(), 2), 2));
    8: iskeyword(extract(extract(list(), 3), 3));

    9: lighten(saturn(red, 12%), 34%);
}

// ............................................................

.in-parameter-rgba(@a: rgba(1, 2, 3, .4)) {
    1: @a;
}

.in-parameter-rgbb(@a: rgbb(1, 2, 3, .4)) {
    2: @a;
}

misc-in-parameter {
    .in-parameter-rgba;
    .in-parameter-rgbb;
}

// ............................................................

.in-guard() when (very-true()) {
    1: correct;
}

.function-very-true() {
    return: true;
}

misc-in-guard {
    .in-guard;
}


