mirror of
https://github.com/rm-dr/daisy
synced 2025-08-02 01:34:50 -07:00
Added shadow variables
This commit is contained in:
@ -78,15 +78,13 @@ impl Token {
|
||||
},
|
||||
|
||||
Token::Word(l, s) => {
|
||||
|
||||
let c = Constant::from_string(&s);
|
||||
if c.is_some() { return Ok(Expression::Constant(l, c.unwrap())); }
|
||||
|
||||
let c = Unit::from_string(&s);
|
||||
if c.is_some() { return Ok(Expression::Quantity(l, c.unwrap())); }
|
||||
|
||||
let c = context.get_variable(&s);
|
||||
if c.is_some() { return Ok(Expression::Variable(l, s)); }
|
||||
if context.is_varible(&s) { return Ok(Expression::Variable(l, s)); }
|
||||
return Ok(Expression::Variable(l, s));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user