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
d3f4169d76
Update readme
2018-10-06 16:04:57 +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
48ec04a95f
Only cache some function results
...
Some functions evaluate more quickly without caching than with caching,
because they use data that is cached in a separate read-only cache
that's faster to check, and don't do anything complex with that data.
2018-10-06 13:38:55 +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
11a92511c1
Update readme
2018-10-06 10:42:18 +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
9f6e941955
Add Travis and AppVeyor config
2018-10-05 20:30:50 +01:00
Oliver Hamlet
ce85be1201
Add MIT license
2018-10-05 20:21:14 +01:00
Oliver Hamlet
360058725a
Update readme
2018-10-05 19:54:12 +01:00
Oliver Hamlet
be313c40cb
Support reading file version from Windows executables
2018-10-05 19:52:51 +01:00
Oliver Hamlet
2def44d3aa
Rename release_numbers field to release_ids
...
It's more accurate as they can be non-numeric.
2018-10-05 17:13:31 +01:00
Oliver Hamlet
a3f8d1423c
Pad release numbers to equal length when comparing
2018-10-05 17:13:31 +01:00
Oliver Hamlet
ab2726d5be
Fix a few incorrect test assertions
2018-10-05 17:13:31 +01:00
Oliver Hamlet
3b1f3592b3
Support extended version identifier separators
...
Space, colon and underscore should separate release and pre-release identifiers.
2018-10-05 17:13:31 +01:00
Oliver Hamlet
45ab848c1f
Add tests for non-semver version string comparisons
...
Almost at parity with pseudosem, only identifier padding and extended
separators to go.
2018-10-05 17:13:30 +01:00
Oliver Hamlet
98291fdc23
Implement semver version string comparison
2018-10-05 17:13:30 +01:00