Commit Graph
28 Commits
Author SHA1 Message Date
Oliver Hamlet 3007a9e090 Fix parsing error if parentheses are padded with whitespace 2018-11-14 20:51:02 +00:00
Oliver Hamlet a600083cc9 Apply clippy suggestions 2018-10-25 18:34:00 +01:00
Oliver Hamlet c0bea60673 Add FFI wrapper crate 2018-10-20 21:13:33 +01:00
Oliver Hamlet 0f805d80ea Allow condition cache to be cleared 2018-10-20 21:12:55 +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 10d078b843 Improve content of I/O and PE parsing errors 2018-10-07 10:45:24 +01:00
Oliver Hamlet 2bb3d8b26f Take advantage of match ergonomics 2018-10-06 16:26:18 +01:00
Oliver Hamlet 04a92f9968 Implement the Error trait on the Error enum 2018-10-06 16:04:57 +01:00
Oliver Hamlet 594c8d19af Don't expose third-party dependencies in API
Also implement FromStr on Expression instead of the parse() function.
2018-10-06 15:08:26 +01:00
Oliver Hamlet f6f51e2ee6 Add benchmarks to help optimise result caching 2018-10-06 13:28:03 +01:00
Oliver Hamlet 3404924752 Cache Function evaluation results, and use cached results 2018-10-06 11:45:57 +01:00
Oliver Hamlet 2c8473435a Implement Clone and Default traits on Expression and types it depends on 2018-10-06 10:39:17 +01:00
Oliver Hamlet 77c58c965f Implement Display trait on Expression and all types it depends on 2018-10-06 10:36:39 +01:00
Oliver Hamlet 5d9441623a Derive PartialEq, Eq for Expression, CompoundCondition and Condition 2018-10-06 10:29:50 +01:00
Oliver Hamlet 3bf009e579 Implement PartialEq, Eq for Function 2018-10-06 10:29:50 +01:00
Oliver Hamlet be313c40cb Support reading file version from Windows executables 2018-10-05 19:52:51 +01:00
Oliver Hamlet 8cb69dfa86 Add lexicographical evaluation of version conditions
Versions aren't yet read from executables, and evaluation isn't
pseudosem-compatible.
2018-10-05 17:12:38 +01:00
Oliver Hamlet 3acf2ffea1 Refactor game-specific code and add tests for it 2018-10-04 22:16:30 +01:00
Oliver Hamlet 107f61868c Silence name warnings 2018-10-04 22:16:29 +01:00
Oliver Hamlet 3e1c2084e5 Add evaluation of checksum() conditions 2018-10-03 19:21:45 +01:00
Oliver Hamlet 2e57585787 Add evaluation of active() and many_active() conditions 2018-10-03 18:31:26 +01:00
Oliver Hamlet b9448e2072 Implement file path function evaluation 2018-10-03 17:15:34 +01:00
Oliver Hamlet abdc841c15 Add parsing of file regex, active regex, many and many_active functions 2018-10-03 17:15:34 +01:00
Oliver Hamlet dfb41233bd Update nom to v4 and regex to v1 2018-10-03 17:15:33 +01:00