ProgrammingLanguage types need Debug
This commit is contained in:
parent
1ac440c8df
commit
5e474231da
@ -1,3 +1,4 @@
|
||||
use std::fmt::Debug;
|
||||
|
||||
pub struct TokenError {
|
||||
pub msg: String,
|
||||
@ -8,8 +9,8 @@ pub struct ParseError {
|
||||
}
|
||||
|
||||
pub trait ProgrammingLanguage {
|
||||
type Token;
|
||||
type AST;
|
||||
type Token: Debug;
|
||||
type AST: Debug;
|
||||
|
||||
fn tokenize(input: &str) -> Result<Vec<Self::Token>, TokenError>;
|
||||
fn parse(input: Vec<Self::Token>) -> Result<Self::AST, ParseError>;
|
||||
|
Loading…
Reference in New Issue
Block a user