diff --git a/src/protocol/ast.rs b/src/protocol/ast.rs index 3bcc0b525893c980586cd57246693feb65892865..c119e5ed087671302601906a25c5e0eff565789d 100644 --- a/src/protocol/ast.rs +++ b/src/protocol/ast.rs @@ -1009,8 +1009,7 @@ impl UnionDefinition { #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum ProcedureKind { Function, // with return type - Primitive, // without return type - Composite, + Component, } /// Monomorphed instantiation of a procedure (or the sole instantiation of a @@ -1087,6 +1086,7 @@ pub enum ProcedureSource { // Builtin components, available to user CompRandomU32, // TODO: Remove, temporary thing CompTcpClient, + CompTcpListener, } impl ProcedureSource { @@ -1099,8 +1099,7 @@ impl ProcedureSource { } -/// Generic storage for functions, primitive components and composite -/// components. +/// Generic storage for functions and components. // Note that we will have function definitions for builtin functions as well. In // that case the span, the identifier span and the body are all invalid. #[derive(Debug)] @@ -1854,6 +1853,7 @@ pub enum Method { // Builtin component, ComponentRandomU32, ComponentTcpClient, + ComponentTcpListener, // User-defined UserFunction, UserComponent, @@ -1864,7 +1864,7 @@ impl Method { use Method::*; match self { Get | Put | Fires | Create | Length | Assert | Print => true, - ComponentRandomU32 | ComponentTcpClient => true, + ComponentRandomU32 | ComponentTcpClient | ComponentTcpListener => true, _ => false, } }