[][src]Crate luis

A Lua parser

use luis::ast::*;
use luis::parse::parse;

let program = "print('hello world')";

assert_eq!(
   parse(&program),
   Ok(Block {
       stats: vec![Stat::FunctionCall(FunctionCall {
           expr: Box::new(PrefixExpr::Var(Var::Name(
               Name(String::from("print"))
           ))),
           args: Args::ExprList(vec![
               Expr::Str(String::from("hello world"))
           ])
       })],
       retstat: None,
   })
);

Modules

ast
iter
lex
parse