[fine] Parse alternate types
This commit is contained in:
parent
f7acfd588d
commit
afa4812074
10 changed files with 73 additions and 26 deletions
|
|
@ -658,7 +658,8 @@ fn compile_new_object_expression(c: &mut Compiler, t: TreeRef, tree: &Tree) -> C
|
|||
}
|
||||
|
||||
// Fetch the correct constructor.
|
||||
let type_reference = tree.child_tree_of_kind(c.syntax, TreeKind::TypeExpression)?;
|
||||
// TODO: Binding this type should be done by semantics, and we should borrow it.
|
||||
let type_reference = tree.child_tree_of_kind(c.syntax, TreeKind::TypeIdentifier)?;
|
||||
let identifier = type_reference.nth_token(0)?;
|
||||
let environment = c.semantics.environment_of(t);
|
||||
match environment.bind(identifier)? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue