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