Take TokenError type out of schala-lib

This commit is contained in:
greg 2017-11-01 22:41:34 -07:00
parent ef7412dcd5
commit 9545130fd3
4 changed files with 24 additions and 13 deletions

View File

@ -2,17 +2,6 @@ extern crate colored;
use self::colored::*;
#[derive(Debug)]
pub struct TokenError {
pub msg: String,
}
impl TokenError {
pub fn new(msg: &str) -> TokenError {
TokenError { msg: msg.to_string() }
}
}
pub struct LLVMCodeString(pub String);
#[derive(Debug, Default, Serialize, Deserialize)]

View File

@ -5,6 +5,17 @@ pub mod compilation;
use schala_lib::language::{ProgrammingLanguageInterface, EvalOptions, ReplOutput, TraceArtifact, LLVMCodeString};
#[derive(Debug)]
pub struct TokenError {
pub msg: String,
}
impl TokenError {
pub fn new(msg: &str) -> TokenError {
TokenError { msg: msg.to_string() }
}
}
pub use self::eval::Evaluator as MaaruEvaluator;
pub struct Maaru<'a> {

View File

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

View File

@ -1,6 +1,6 @@
use itertools::Itertools;
use schala_lib::language::{ProgrammingLanguageInterface, EvalOptions, ReplOutput, TokenError};
use schala_lib::language::{ProgrammingLanguageInterface, EvalOptions, ReplOutput};
pub struct Robo {
}
@ -11,6 +11,17 @@ impl Robo {
}
}
#[derive(Debug)]
pub struct TokenError {
pub msg: String,
}
impl TokenError {
pub fn new(msg: &str) -> TokenError {
TokenError { msg: msg.to_string() }
}
}
#[allow(dead_code)]
#[derive(Debug)]
pub enum Token {