FIX: no_float errors.
This commit is contained in:
parent
c5f66e932b
commit
65d611b976
@ -871,6 +871,7 @@ fn parse_primary<'a>(
|
||||
|
||||
let mut root_expr = match token {
|
||||
Token::IntegerConstant(x) => Expr::IntegerConstant(x, pos),
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
Token::FloatConstant(x) => Expr::FloatConstant(x, pos),
|
||||
Token::CharConstant(c) => Expr::CharConstant(c, pos),
|
||||
Token::StringConst(s) => Expr::StringConstant(s.into(), pos),
|
||||
|
@ -120,6 +120,7 @@ impl fmt::Debug for Position {
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum Token {
|
||||
IntegerConstant(INT),
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
FloatConstant(FLOAT),
|
||||
Identifier(String),
|
||||
CharConstant(char),
|
||||
@ -197,6 +198,7 @@ impl Token {
|
||||
|
||||
match self {
|
||||
IntegerConstant(i) => i.to_string().into(),
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
FloatConstant(f) => f.to_string().into(),
|
||||
Identifier(s) => s.into(),
|
||||
CharConstant(c) => c.to_string().into(),
|
||||
|
Loading…
Reference in New Issue
Block a user