prevent external calls to .leo programs

This commit is contained in:
evan-schott 2023-12-05 20:01:16 -08:00
parent 51e3ad9f78
commit 54c6020afd

View File

@ -468,7 +468,9 @@ impl ParserContext<'_> {
span,
id: self.node_builder.next_id(),
}))
} else if self.eat(&Token::Leo) || self.eat(&Token::Aleo) {
} else if self.eat(&Token::Leo) {
return Err(ParserError::only_aleo_external_calls(expr.span()).into());
} else if self.eat(&Token::Aleo) {
expr = self.parse_external_call(expr)?;
} else {
// Parse identifier name.