summaryrefslogtreecommitdiffstats
path: root/src/poem/read.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/poem/read.rs')
-rw-r--r--src/poem/read.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/poem/read.rs b/src/poem/read.rs
index 99e9aa6..baf6a1d 100644
--- a/src/poem/read.rs
+++ b/src/poem/read.rs
@@ -246,6 +246,7 @@ impl Readable for Poem {
'#' => Rune::Remark,
'\'' | '"' => Rune::String,
'`' => Rune::Poem,
+ '=' => Rune::Notes,
'<' => Rune::Read,
'>' => next(&mut chars, &mut i, Rune::Write, vec![(">", Rune::Addendum)]),
'1' => next(
@@ -352,7 +353,11 @@ impl Readable for Poem {
match rune {
// Indicates the end of a word (space dilineated)
Rune::Pause => {
+ if word.contains(&'=') && verse.is_empty() {
+ channel = Some(Rune::Notes);
+ }
verse.add(&mut word, channel);
+ channel = Some(rune);
}
Rune::Special => {
@@ -378,6 +383,15 @@ impl Readable for Poem {
poem!(chars, j, i, c, verse, word, env);
}
+ // Indicates an environment variable to fork with,
+ // if the verse's stanza is empty so far
+ // Rune::Environment => {
+ // word.push(c);
+ // if verse.is_empty() {
+ // channel = Some(rune);
+ // }
+ // }
+
// Indicates a file operation (<, >, or >>)
Rune::Read
| Rune::Write
@@ -388,7 +402,7 @@ impl Readable for Poem {
| Rune::AddendumAll => {
channel = Some(rune);
verse.add(&mut word, channel);
- channel = Some(rune);
+ // channel = Some(rune);
verse.io.push(rune);
}