[fine] Evaluate is expressions, SO MANY BUG FIXES
This commit is contained in:
parent
b5b56b49a9
commit
198dc5bdb3
6 changed files with 215 additions and 42 deletions
|
|
@ -123,6 +123,7 @@ pub enum Type {
|
|||
// TODO: Numeric literals should be implicitly convertable, unlike other
|
||||
// types. Maybe just "numeric literal" type?
|
||||
F64,
|
||||
I64,
|
||||
String,
|
||||
Bool,
|
||||
|
||||
|
|
@ -172,6 +173,7 @@ impl fmt::Display for Type {
|
|||
Assignment(_) => write!(f, "assignment"),
|
||||
Nothing => write!(f, "()"),
|
||||
F64 => write!(f, "f64"),
|
||||
I64 => write!(f, "i64"),
|
||||
String => write!(f, "string"),
|
||||
Bool => write!(f, "bool"),
|
||||
Function(args, ret) => {
|
||||
|
|
@ -831,6 +833,9 @@ impl<'a> Semantics<'a> {
|
|||
return Environment::error();
|
||||
};
|
||||
|
||||
// TODO: This binding should be un-assignable! Don't assign to this!
|
||||
// (UNLESS VERY SPECIFIC CIRCUMSTANCES; WHICH ARE COMPLEX)
|
||||
|
||||
let mut env = Environment::new(Some(parent), Location::Local);
|
||||
env.insert(variable, type_expr);
|
||||
return EnvironmentRef::new(env);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue