luaparser 0.1.1

Read Lua 5.1 code and produce an abstract syntax tree
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::nodes::Expression;

#[derive(Clone, Debug, PartialEq, Eq)]
pub struct NumberExpression {
    pub value: String,
}

impl From<String> for NumberExpression {
    fn from(value: String) -> Self {
        Self { value }
    }
}

impl Into<Expression> for NumberExpression {
    fn into(self) -> Expression {
        Expression::Number(self)
    }
}