Skip to content

Commit 2a755c7

Browse files
committed
Move interface and world declarations.
This commit moves interface and world declarations under type statement, rather than top-level statements. This refactoring will help with my first attempt to register types as part of resolution, as now type statement contains all possible type declarations.
1 parent 8601652 commit 2a755c7

6 files changed

Lines changed: 620 additions & 660 deletions

File tree

crates/wac-parser/src/ast.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,16 @@ use std::{fmt, path::Path};
1717
mod export;
1818
mod expr;
1919
mod import;
20-
mod interface;
2120
pub mod keywords;
2221
mod r#let;
2322
pub mod symbols;
2423
mod r#type;
25-
mod world;
2624

2725
pub use export::*;
2826
pub use expr::*;
2927
pub use import::*;
30-
pub use interface::*;
3128
pub use r#let::*;
3229
pub use r#type::*;
33-
pub use world::*;
3430

3531
/// Used to indent output when displaying AST nodes.
3632
#[derive(Debug, Clone, Copy, Default)]
@@ -242,10 +238,6 @@ pub enum StatementKind<'a> {
242238
Import(ImportStatement<'a>),
243239
/// A type statement.
244240
Type(TypeStatement<'a>),
245-
/// An interface statement.
246-
Interface(InterfaceStatement<'a>),
247-
/// A world statement.
248-
World(WorldStatement<'a>),
249241
/// A let statement.
250242
Let(LetStatement<'a>),
251243
/// An export statement.
@@ -257,8 +249,6 @@ impl AstDisplay for StatementKind<'_> {
257249
match self {
258250
Self::Import(import) => import.fmt(f, indenter),
259251
Self::Type(ty) => ty.fmt(f, indenter),
260-
Self::Interface(interface) => interface.fmt(f, indenter),
261-
Self::World(world) => world.fmt(f, indenter),
262252
Self::Let(l) => l.fmt(f, indenter),
263253
Self::Export(export) => export.fmt(f, indenter),
264254
}

crates/wac-parser/src/ast/interface.rs

Lines changed: 0 additions & 258 deletions
This file was deleted.

0 commit comments

Comments
 (0)