schala/src/main.rs
greg 69d5f38ea1 Refactor into libs part II
woo it compiles
2017-10-30 22:18:02 -07:00

46 lines
1.2 KiB
Rust

#![feature(link_args)]
#![feature(advanced_slice_patterns, slice_patterns, box_patterns, box_syntax)]
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate getopts;
extern crate linefeed;
extern crate itertools;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate maplit;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate rocket;
extern crate rocket_contrib;
extern crate includedir;
extern crate phf;
use std::path::Path;
use std::fs::File;
use std::io::{Read, Write};
use std::process::exit;
use std::default::Default;
mod schala_lang;
mod maaru_lang;
mod robo_lang;
extern crate schala_lib;
use schala_lib::{PLIGenerator, schala_main};
use schala_lib::language::ProgrammingLanguageInterface;
#[link_args="-ltinfo"]
extern { }
fn main() {
let generators: Vec<PLIGenerator> = vec![
Box::new(|| { let x: Box<ProgrammingLanguageInterface> = Box::new(schala_lang::Schala::new()); x }),
Box::new(|| { let x: Box<ProgrammingLanguageInterface> = Box::new(maaru_lang::Maaru::new()); x }),
Box::new(|| { let x: Box<ProgrammingLanguageInterface> = Box::new(robo_lang::Robo::new()); x }),
];
schala_main(generators);
}