Commit Graph
14 Commits
Author SHA1 Message Date
Oliver Hamlet 52792626af Update to Rust 2018 syntax 2019-06-30 11:25:23 +01:00
Oliver Hamlet 4db34be2c9 Upgrade to nom v5
Error handling has changed, affecting the error variants LCI exports,
and macros are replaced by functions, so all the parsing code has been rewritten.
2019-06-30 11:25:23 +01:00
Oliver Hamlet 53a5e22225 Fix functions with a regex parameter not parsing closing ')' 2019-01-26 09:46:41 +00:00
Oliver Hamlet 9ef82fe886 Run rustfmt (Rust 1.31.1) 2018-12-22 22:50:16 +00:00
Oliver Hamlet 579ba2969a Fix backslashes not allowed in paths that can't be regexes 2018-11-14 20:51:02 +00:00
Oliver Hamlet 26bbda4925 Fix parsing of greater/less-than-or-equal-to parameters 2018-11-14 20:18:28 +00:00
Oliver Hamlet 0c0e8a6639 Add support for product_version() conditions
This checks the product version field of executables instead of their
file version field.
2018-10-23 21:12:40 +01:00
Oliver Hamlet 180b728728 Improve parsing error messages
Nom's custom error type handling isn't great, requiring a lot of
fix_error! macro calls, and even then the complete! macro hardcodes the
error type it expects as u32, so it can't be used and instead the
CompleteStr type needs to be used everywhere.
2018-10-07 10:45:24 +01:00
Oliver Hamlet d28c194c9d Add typedef to abstract away custom parsing error type 2018-10-07 10:45:24 +01:00
Oliver Hamlet 1881348db3 Create Regex objects to match case insensitively 2018-10-03 18:17:35 +01:00
Oliver Hamlet 291d7a7a69 Move check to see if path is in game directory to parsing time 2018-10-03 17:15:35 +01:00
Oliver Hamlet fe7b0514fb Split regex arguments that contain parent paths at parsing time
This will simplify evaluation and catches syntax errors earlier, and
matches the current LOOT implementation's parse-only behaviour more
closely, though that implementation also checks that the parent path is
valid regex, which is pointless.
2018-10-03 17:15:35 +01:00
Oliver Hamlet b9448e2072 Implement file path function evaluation 2018-10-03 17:15:34 +01:00
Oliver Hamlet 11fef635d3 Split function parsing and evaluation code into separate files 2018-10-03 17:15:34 +01:00