case CHANNELS:
result->intval= mp_channels(ctx);
return ST_INTVAL;
+ case DURATION:
+ result->intval= mp_duration(ctx);
+ return ST_INTVAL;
/* bools */
case IS_SET:
arg = node->children[0]->sv.strval;
%token <node> BITRATE
%token <node> FREQUENCY
%token <node> CHANNELS
+%token <node> DURATION
%token <node> FALSE TRUE
/* keywords without semantic value */
| BITRATE {$$ = mp_new_ast_leaf_node(BITRATE);}
| FREQUENCY {$$ = mp_new_ast_leaf_node(FREQUENCY);}
| CHANNELS {$$ = mp_new_ast_leaf_node(CHANNELS);}
+ | DURATION {$$ = mp_new_ast_leaf_node(DURATION);}
;
boolexp: IS_SET '(' STRING_LITERAL ')' {$$ = ast_node_new_unary(IS_SET, $3);}