Rmoved package
This commit is contained in:
@@ -31,7 +31,6 @@ pub enum BinaryOp {
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub enum TopLevel {
|
||||
Import(String),
|
||||
Package(String),
|
||||
StructDecl {
|
||||
export: bool,
|
||||
name: String,
|
||||
|
||||
@@ -13,9 +13,7 @@ inner_str = @{ (!"\"" ~ ANY)* }
|
||||
|
||||
// ================= TOP LEVEL =================
|
||||
|
||||
top_level = _{ import | function_decl | struct_decl | package }
|
||||
|
||||
package = { "package" ~ identifier ~ ";" }
|
||||
top_level = _{ import | function_decl | struct_decl }
|
||||
|
||||
export = { "public" }
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ use pest::Parser;
|
||||
use pest_derive::Parser;
|
||||
|
||||
pub mod ast;
|
||||
pub mod script_parser;
|
||||
|
||||
use ast::*;
|
||||
|
||||
@@ -79,10 +78,6 @@ impl TryFrom<pest::iterators::Pair<'_, Rule>> for TopLevel {
|
||||
let path = pair.into_inner().next().unwrap().as_str().to_string();
|
||||
Ok(TopLevel::Import(path))
|
||||
}
|
||||
Rule::package => {
|
||||
let name = pair.into_inner().next().unwrap().as_str().to_string();
|
||||
Ok(TopLevel::Package(name))
|
||||
}
|
||||
Rule::function_decl => {
|
||||
let mut inner = pair.into_inner();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user