-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
158f54d
commit 87e0390
Showing
5 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*! | ||
* Journal Reader reads lines from the journal string and keeps track of the | ||
* line number. | ||
*/ | ||
|
||
/// Reads the input text line by line and keeps track of the line number. | ||
struct JournalReader {} | ||
|
||
impl JournalReader { | ||
pub fn new() -> Self { | ||
JournalReader { } | ||
} | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::JournalReader; | ||
|
||
#[test] | ||
fn test_instantiation() { | ||
let x = JournalReader::new(); | ||
|
||
// if no exceptions | ||
assert!(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/*! | ||
* A different approach to parsing. | ||
* Tailored to Wasm usage. | ||
* Break down steps into logical units. | ||
* Use the iterator? | ||
*/ | ||
|
||
use std::io::{BufReader, Read}; | ||
|
||
use crate::iterator::DirectiveType; | ||
|
||
/// Read Journal, convert to directives | ||
pub fn text_to_directives() { | ||
// reader: BufReader<T> | ||
// todo | ||
|
||
// read line from the Journal | ||
// determine the type | ||
// DirectiveType | ||
// scan the line | ||
// parse into a model instance | ||
// read additional lines, as needed. Ie for Xact/Posts. | ||
// return the directive with the entity, if created | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/*! | ||
* Tests for the functionality used in Wasm. | ||
*/ |