Merge branch 'master' of https://github.com/connorskees/grass into modules
This commit is contained in:
commit
835aa34dee
@ -50,7 +50,7 @@ pub(crate) fn peek_whitespace_or_comment(s: &mut PeekMoreIterator<IntoIter<Token
|
||||
found_whitespace = true;
|
||||
s.advance_cursor();
|
||||
}
|
||||
'/' => match s.peek_forward(1) {
|
||||
'/' => match s.peek_next() {
|
||||
Some(Token { kind: '/', .. }) => {
|
||||
peek_until_newline(s);
|
||||
found_whitespace = true;
|
||||
@ -60,7 +60,8 @@ pub(crate) fn peek_whitespace_or_comment(s: &mut PeekMoreIterator<IntoIter<Token
|
||||
while let Some(tok) = s.peek_next() {
|
||||
match tok.kind {
|
||||
'*' => {
|
||||
if matches!(s.peek_forward(1), Some(Token { kind: '/', .. })) {
|
||||
if matches!(s.peek_next(), Some(Token { kind: '/', .. })) {
|
||||
s.advance_cursor();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -168,3 +168,14 @@ error!(
|
||||
filter_value_after_equal_is_last_char,
|
||||
"a {\n color: foo(a=a", "Error: expected \")\"."
|
||||
);
|
||||
test!(
|
||||
space_after_loud_comment,
|
||||
"@mixin foo($x) {
|
||||
color: $x;
|
||||
}
|
||||
|
||||
a {
|
||||
@include foo($x /* blah */ : kwd-y);
|
||||
}",
|
||||
"a {\n color: kwd-y;\n}\n"
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user