Skip to content

Commit

Permalink
Change comment detect pos
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichiueda committed Feb 2, 2024
1 parent 5723d28 commit 7f18056
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/elements/word.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ impl Word {
}

pub fn parse(feeder: &mut Feeder, core: &mut ShellCore) -> Option<Word> {
if feeder.starts_with("#") {
return None;
}

let mut ans = Word::new();
while let Some(sw) = UnquotedSubword::parse(feeder, core) {
ans.text += &sw.text.clone();
Expand Down
4 changes: 0 additions & 4 deletions src/feeder/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ impl Feeder {
}

pub fn scanner_word(&mut self, core: &mut ShellCore) -> usize {
if self.remaining.starts_with("#") {
return 0;
}

let mut next_line = false;
let mut ans = 0;
for ch in self.remaining.chars() {
Expand Down

0 comments on commit 7f18056

Please sign in to comment.