Skip to content

Commit

Permalink
Revert literal parsing order. Fixes rust-bindgen#1424
Browse files Browse the repository at this point in the history
  • Loading branch information
Jethro Beekman committed Oct 18, 2018
1 parent 68261ff commit ee2bc79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cexpr"
version = "0.3.2"
version = "0.3.3"
authors = ["Jethro Beekman <jethro@jbeekman.nl>"]
license = "Apache-2.0/MIT"
description = "A C expression parser and evaluator"
Expand Down
2 changes: 1 addition & 1 deletion src/literal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ named!(c_float<f64>,
named!(one_literal<&[u8],EvalResult,::Error>,
fix_error!(::Error,alt_complete!(
map!(full!(c_char),EvalResult::Char) |
map!(full!(c_float),EvalResult::Float) |
map!(full!(c_int),|i|EvalResult::Int(::std::num::Wrapping(i))) |
map!(full!(c_float),EvalResult::Float) |
map!(full!(c_string),EvalResult::Str)
))
);
Expand Down
1 change: 1 addition & 0 deletions tests/input/int_unsigned.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define Int_0 0
#define Int_1 0b1
#define Int_2 0x2
#define Int_3 3L
#define Int_63 077
#define Int_123 123
#define Int_124 124u
Expand Down

0 comments on commit ee2bc79

Please sign in to comment.