schala/src/main.rs

47 lines
1.1 KiB
Rust
Raw Normal View History

#![feature(link_args)]
#![feature(advanced_slice_patterns, slice_patterns, box_patterns, box_syntax)]
#![feature(plugin)]
#![plugin(rocket_codegen)]
2016-12-28 15:56:02 -08:00
extern crate getopts;
extern crate linefeed;
2017-09-18 19:09:27 -07:00
extern crate itertools;
2017-09-07 19:38:22 -07:00
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate maplit;
2017-09-17 18:57:47 -07:00
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate rocket;
2017-09-19 20:29:08 -07:00
extern crate rocket_contrib;
2017-10-12 02:13:55 -07:00
extern crate includedir;
extern crate phf;
2015-08-14 17:07:02 -07:00
use std::path::Path;
use std::fs::File;
2017-10-02 22:58:03 -07:00
use std::io::{Read, Write};
use std::process::exit;
use std::default::Default;
2015-07-22 03:02:55 -07:00
mod schala_lang;
mod maaru_lang;
2017-08-29 00:28:19 -07:00
mod robo_lang;
2017-10-30 20:06:20 -07:00
extern crate schala_lib;
use schala_lib::{PLIGenerator, schala_main};
2017-10-12 02:13:55 -07:00
#[link_args="-ltinfo"]
extern { }
2015-07-16 01:40:37 -07:00
fn main() {
2017-10-29 04:09:10 -07:00
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);
}
2017-09-01 02:08:26 -07:00