From f9fe81993f3cd5bf29d884249972b9f7b01533e1 Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 29 Aug 2017 04:27:07 -0700 Subject: [PATCH] Beginning parsing code --- src/schala_lang/mod.rs | 11 ++++------- src/schala_lang/parsing.rs | 8 ++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 src/schala_lang/parsing.rs diff --git a/src/schala_lang/mod.rs b/src/schala_lang/mod.rs index 24929bd..5f9eebb 100644 --- a/src/schala_lang/mod.rs +++ b/src/schala_lang/mod.rs @@ -1,13 +1,10 @@ use language::{ProgrammingLanguage, EvaluationMachine, ParseError, TokenError, LLVMCodeString}; +mod parsing; + pub struct Schala { } -#[derive(Debug)] -enum Token { } -#[derive(Debug)] -enum AST { } - impl Schala { pub fn new() -> Schala { Schala { } @@ -15,8 +12,8 @@ impl Schala { } impl ProgrammingLanguage for Schala { - type Token = Token; - type AST = AST; + type Token = parsing::Token; + type AST = parsing::AST; type Evaluator = SchalaEvaluator; fn name() -> String { diff --git a/src/schala_lang/parsing.rs b/src/schala_lang/parsing.rs new file mode 100644 index 0000000..181da78 --- /dev/null +++ b/src/schala_lang/parsing.rs @@ -0,0 +1,8 @@ +use language::{TokenError, ParseError}; + + +#[derive(Debug)] +pub enum Token { } + +#[derive(Debug)] +pub enum AST { }