Doccomment expression stuff
This commit is contained in:
parent
e228e953be
commit
a53d38eef0
|
@ -7,6 +7,7 @@ use super::{
|
|||
};
|
||||
use crate::{ast::ImportPattern, engine::EngineState, BlockId, OutDest, Signature, Span, VarId};
|
||||
|
||||
/// An [`Expression`] AST node
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum Expr {
|
||||
Bool(bool),
|
||||
|
@ -119,6 +120,7 @@ impl Expr {
|
|||
}
|
||||
}
|
||||
|
||||
/// Expressions permitted inside a record expression/literal
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum RecordItem {
|
||||
/// A key: val mapping
|
||||
|
@ -127,6 +129,7 @@ pub enum RecordItem {
|
|||
Spread(Span, Expression),
|
||||
}
|
||||
|
||||
/// Expressions permitted inside a list expression/literal
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum ListItem {
|
||||
/// A normal expression
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::{
|
|||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Wrapper around [`Expr`]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Expression {
|
||||
pub expr: Expr,
|
||||
|
|
Loading…
Reference in New Issue
Block a user