Skip to main content

ocelot_ast/
statement.rs

1use crate::statement_kind::StatementKind;
2use ocelot_base::span::Span;
3
4/// Script statement with an explicit source span.
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub struct Statement {
7    pub kind: StatementKind,
8    pub span: Span,
9}
10
11impl Statement {
12    /// Creates a statement from its kind and source span.
13    pub fn new(kind: StatementKind, span: Span) -> Self {
14        Self { kind, span }
15    }
16}