First, thank you very much for these new built-in functions, @tzolkincz - these are definitely generally useful. Perhaps we can imitate what SQL server and others do, but only support a limited subset for now. I don't think this would require any changes to your implementation - this would be a parser only change, as you'd still compile down to the same built-in function expression that you created:
(FIRST_VALUE | LAST_VALUE) ( [scalar_expression ) 
    OVER ( [ partition_by_clause ] order_by_clause rows_range_clause ) 

We wouldn't yet support a partition_by_clause and the only rows_range_clause we'd support would be to specify the Nth row (i.e. your offset argument) which would be a bit non standard. The order_by_clause would map to your second argument and if DESC is used instead of ASC, you'd just need to wrap this in a call to the INVERT built-in function.