Move maaru into separate crate

This commit is contained in:
greg 2018-03-20 23:29:56 -07:00
parent 795b4adc6b
commit 5f279cb400
8 changed files with 29 additions and 12 deletions

View File

@ -13,6 +13,7 @@ maplit = "*"
colored = "1.5" colored = "1.5"
schala-repl = { path = "schala-repl" } schala-repl = { path = "schala-repl" }
maaru-lang = { path = "maaru" }
[build-dependencies] [build-dependencies]
includedir_codegen = "0.2.0" 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::prelude::*;
use self::llvm_sys::{LLVMIntPredicate}; 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::LLVMCodeString;
use schala_repl::llvm_wrap as LLVMWrap; use schala_repl::llvm_wrap as LLVMWrap;

View File

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

View File

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

View File

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

View File

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

View File

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