summaryrefslogtreecommitdiff
path: root/src/taiga.lalrpop
blob: b60d68f550e637b697ccfedb23c2af68a0714fa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::str::FromStr;
use ast;

grammar;

pub Program: ast::Program = {
    Expression => ast::Program(<>),
};

Expression: Box<ast::Expression> = {
    Num => Box::new(ast::Expression::Number(<>)),
};

Num: u64 = r"[0-9]+" => u64::from_str(<>).unwrap();