ocelot-ast 0.1.2

Abstract syntax tree types for the ocelot project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::expression::Expression;

/// `println(...)` statement node.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PrintlnStatement {
    pub argument: Expression,
}

impl PrintlnStatement {
    /// Creates a println statement from its argument expression.
    pub fn new(argument: Expression) -> Self {
        Self { argument }
    }
}