Start adding import keyword
This commit is contained in:
parent
06026604cc
commit
603ea89b98
@ -13,7 +13,7 @@
|
||||
//! ```text
|
||||
//! program := (statement delimiter)* EOF
|
||||
//! delimiter := NEWLINE | ";"
|
||||
//! statement := expression | declaration
|
||||
//! statement := expression | declaration | import
|
||||
//! block := "{" (statement delimiter)* "}"
|
||||
//! declaration := type_declaration | func_declaration | binding_declaration | impl_declaration
|
||||
//! ```
|
||||
@ -141,8 +141,10 @@
|
||||
//! enumerators := enumerator ("," enumerators)*
|
||||
//! enumerator := identifier "<-" expression | identifier "=" expression //TODO add guards, etc.
|
||||
//! ```
|
||||
//!
|
||||
|
||||
//! ## Imports
|
||||
//! ```text
|
||||
//! import := 'import'
|
||||
//! ```
|
||||
mod test;
|
||||
|
||||
use std::rc::Rc;
|
||||
|
@ -55,7 +55,7 @@ pub enum Kw {
|
||||
Alias, Type, SelfType, SelfIdent,
|
||||
Interface, Impl,
|
||||
True, False,
|
||||
Module
|
||||
Module, Import
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
@ -82,6 +82,7 @@ lazy_static! {
|
||||
"true" => Kw::True,
|
||||
"false" => Kw::False,
|
||||
"module" => Kw::Module,
|
||||
"import" => Kw::Import,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user