The more I think about this, the more I think it's gonna be super slow and bad. There must bve a good way of doing this, but I'm not sure how...
11 lines
322 B
Zig
11 lines
322 B
Zig
const Scrobble = @import("types").LastFMScrobble;
|
|
const Rules = @import("types").Rules;
|
|
|
|
pub fn applyRule(scrobble: Scrobble, rules: Rules) !Scrobble {
|
|
var output_scrobble: Scrobble = scrobble;
|
|
for (rules) |rule| {
|
|
for (rule.conditionals) |cond| {
|
|
switch (cond.match_cond) {}
|
|
}
|
|
}
|
|
}
|