From 0ce59d6169728fad9b202dcd10f088c8a2675ce4 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Mon, 18 Dec 2017 16:10:02 -0800 Subject: [PATCH] Some work on the parser --- src/parser.rs | 4 ++-- tests/parser.rs | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 803827b..9957ad1 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -52,8 +52,8 @@ impl Parser { } /// Parses a single string from the GUI and turns it into a neatly packaged TokenResult for processing - /// by the engine - pub fn parse(s: &str) -> TokenResult { + /// by the engine. + pub fn parse(s: &str) -> Result { let tokens: Vec<&str> = s.split_whitespace().collect::>(); } } diff --git a/tests/parser.rs b/tests/parser.rs index e69de29..42354e8 100644 --- a/tests/parser.rs +++ b/tests/parser.rs @@ -0,0 +1,6 @@ +// TODO: Write parser tests before implementing the parser. +// Start with setoption and branch out from there. The commands are finite so you should be able +// to write a test for each one. Take the time to do this right so that the rest of this project is +// a cakewalk +// +// // Also remember to fix the constant thing noted in the lib.rs for uci.... lol