fabriquer / fabrique

A build description language
Other
3 stars 1 forks source link

Add pattern matching #33

Open trombonehero opened 9 years ago

trombonehero commented 9 years ago

Together with polymorphism (#5), this would allow use to write functions like fold().

trombonehero commented 5 years ago

It might be helpful to be able to write something like:

object_file = match source_file.extension
{
    'o' => source_file,
    'c' => toolchain.cc(source_file),
    # ... etc ...
};

Then again, maybe we want something more like a map so that we can flexibly add new toolchain handlers?