mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
another inline
This commit is contained in:
parent
9f2906a2f8
commit
2e3a8befc9
1 changed files with 30 additions and 1 deletions
|
@ -291,7 +291,36 @@ fn eat_line_comment<'a>(
|
|||
|
||||
comments_and_newlines.push(CommentOrNewline::DocComment(""));
|
||||
multiline = true;
|
||||
return eat_spaces(state, multiline, comments_and_newlines);
|
||||
|
||||
for c in state.bytes() {
|
||||
match c {
|
||||
b' ' => {
|
||||
state = state.advance(1);
|
||||
}
|
||||
b'\n' => {
|
||||
state = state.advance_newline();
|
||||
multiline = true;
|
||||
comments_and_newlines.push(CommentOrNewline::Newline);
|
||||
}
|
||||
b'\r' => {
|
||||
state = state.advance_newline();
|
||||
}
|
||||
b'\t' => {
|
||||
return HasTab(state);
|
||||
}
|
||||
b'#' => {
|
||||
state = state.advance(1);
|
||||
return eat_line_comment(state, multiline, comments_and_newlines);
|
||||
}
|
||||
_ => break,
|
||||
}
|
||||
}
|
||||
|
||||
return Good {
|
||||
state,
|
||||
multiline,
|
||||
comments_and_newlines,
|
||||
};
|
||||
}
|
||||
None => {
|
||||
// consume the second #
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue