Move maaru into separate crate

This commit is contained in:
greg 2018-03-20 23:29:56 -07:00
parent 31fc751799
commit 78a250bcba
8 changed files with 29 additions and 12 deletions

View File

@ -13,6 +13,7 @@ maplit = "*"
colored = "1.5"
schala-repl = { path = "schala-repl" }
maaru-lang = { path = "maaru" }
[build-dependencies]
includedir_codegen = "0.2.0"

11
maaru/Cargo.toml Normal file
View File

@ -0,0 +1,11 @@
[package]
name = "maaru-lang"
version = "0.1.0"
authors = ["greg <greg.shuflin@protonmail.com>"]
[dependencies]
itertools = "0.5.8"
take_mut = "0.1.3"
llvm-sys = "*"
schala-repl = { path = "../schala-repl" }

View File

@ -5,7 +5,7 @@ use std::collections::HashMap;
use self::llvm_sys::prelude::*;
use self::llvm_sys::{LLVMIntPredicate};
use maaru_lang::parser::{AST, Statement, Function, Prototype, Expression, BinOp};
use parser::{AST, Statement, Function, Prototype, Expression, BinOp};
use schala_repl::LLVMCodeString;
use schala_repl::llvm_wrap as LLVMWrap;

View File

@ -2,13 +2,13 @@ extern crate take_mut;
use std::collections::HashMap;
use std::collections::VecDeque;
use maaru_lang::parser::{AST, Statement, Expression, Function, Callable, BinOp};
use parser::{AST, Statement, Expression, Function, Callable, BinOp};
use std::rc::Rc;
use std::io::{Write, Stdout, BufWriter};
use std::convert::From;
use maaru_lang::parser::Expression::*;
use maaru_lang::parser::Statement::*;
use parser::Expression::*;
use parser::Statement::*;
type Reduction<T> = (T, Option<SideEffect>);

View File

@ -1,7 +1,11 @@
pub mod tokenizer;
pub mod parser;
pub mod eval;
pub mod compilation;
#![feature(box_patterns)]
extern crate schala_repl;
mod tokenizer;
mod parser;
mod eval;
mod compilation;
use schala_repl::{ProgrammingLanguageInterface, EvalOptions, LanguageOutput, TraceArtifact};

View File

@ -1,5 +1,5 @@
use maaru_lang::tokenizer::{Token, Kw, OpTok};
use maaru_lang::tokenizer::Token::*;
use tokenizer::{Token, Kw, OpTok};
use tokenizer::Token::*;
use std::fmt;
use std::collections::VecDeque;

View File

@ -5,7 +5,7 @@ use std::str::Chars;
use self::itertools::Itertools;
use std::rc::Rc;
use maaru_lang::TokenError;
use TokenError;
#[derive(Debug, Clone, PartialEq)]
pub enum Token {

View File

@ -6,8 +6,9 @@ extern crate lazy_static;
#[macro_use]
extern crate maplit;
extern crate maaru_lang;
mod schala_lang;
mod maaru_lang;
mod robo_lang;
mod rukka_lang;