Wire functions through everything, with some unimplemented, and add a basic scoped map.
This commit is contained in:
@@ -16,7 +16,18 @@ use crate::syntax::Location;
|
||||
/// `validate` and it comes back without errors.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Program {
|
||||
pub statements: Vec<Statement>,
|
||||
pub items: Vec<TopLevel>,
|
||||
}
|
||||
|
||||
/// A thing that can sit at the top level of a file.
|
||||
///
|
||||
/// For the moment, these are statements and functions. Other things
|
||||
/// will likely be added in the future, but for now: just statements
|
||||
/// and functions
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum TopLevel {
|
||||
Statement(Statement),
|
||||
Function(Name, Vec<Name>, Expression),
|
||||
}
|
||||
|
||||
/// A Name.
|
||||
|
||||
Reference in New Issue
Block a user