Skip to content

Commit

Permalink
Resolve some CSS tests
Browse files Browse the repository at this point in the history
1. unquoted strings/urls are fixed by eb25ac9.
2. CSS treats nested selectors as SCSS (aka. lazy nesting).
  • Loading branch information
deathaxe committed Mar 8, 2024
1 parent eb25ac9 commit 6d4d7b9
Showing 1 changed file with 68 additions and 68 deletions.
136 changes: 68 additions & 68 deletions Tests/syntax_test_css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2477,43 +2477,41 @@
/* ^^^^^ support.constant.color.w3c.standard.css */
/* ^ punctuation.section.block.end.css */
// TODO: SCSS needs to see "color" in color{ as a selector, CSS does not
// /* unexpected tokens { } => handle it as expected, using pairing */
// .test-parsing-errors { color{;color:maroon} }
// /* ^^^^^^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
// /* ^^^^^^^^^^^^^^^ meta.property-list.css meta.block.css meta.property-list.css meta.block.css */
// /* ^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
// /* ^ - meta.property-list */
// /* ^ punctuation.section.block.begin.css */
// /* ^^^^^ meta.property-name.css support.type.property-name.css */
// /* ^ punctuation.section.block.begin.css */
// /* ^ punctuation.terminator.rule.css */
// /* ^^^^^ support.type.property-name.css */
// /* ^ punctuation.separator.key-value.css */
// /* ^^^^^^ support.constant.color.w3c.standard.css */
// /* ^ punctuation.section.block.end.css */
// /* ^ punctuation.section.block.end.css */
// TODO: SCSS needs to see "color" in color{ as a selector, CSS does not
// /* same with recovery => handle it as expected, using pairing */
// .test-parsing-errors { color{;color:maroon}; color:green }
// /* ^^^^^^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
// /* ^^^^^^^^^^^^^^^ meta.property-list.css meta.block.css meta.property-list.css meta.block.css */
// /* ^^^^^^^^^^^^^^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
// /* ^ - meta.property-list */
// /* ^ punctuation.section.block.begin.css */
// /* ^^^^^ meta.property-name.css support.type.property-name.css */
// /* ^ punctuation.section.block.begin.css */
// /* ^ punctuation.terminator.rule.css */
// /* ^^^^^ support.type.property-name.css */
// /* ^ punctuation.separator.key-value.css */
// /* ^^^^^^ support.constant.color.w3c.standard.css */
// /* ^ punctuation.section.block.end.css */
// /* ^ punctuation.terminator.rule.css */
// /* ^^^^^ support.type.property-name.css */
// /* ^ punctuation.separator.key-value.css */
// /* ^^^^^ support.constant.color.w3c.standard.css */
// /* ^ punctuation.section.block.end.css */
/* unexpected tokens { } => handle it as expected, using pairing */
.test-parsing-errors { color{;color:maroon} }
/* ^^^^^^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
/* ^^^^^^^^^^^^^^^ meta.property-list.css meta.block.css meta.property-list.css meta.block.css */
/* ^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
/* ^ - meta.property-list */
/* ^ punctuation.section.block.begin.css */
/* ^^^^^ meta.selector.css entity.name.tag.other.css */
/* ^ punctuation.section.block.begin.css */
/* ^ punctuation.terminator.rule.css */
/* ^^^^^ support.type.property-name.css */
/* ^ punctuation.separator.key-value.css */
/* ^^^^^^ support.constant.color.w3c.standard.css */
/* ^ punctuation.section.block.end.css */
/* ^ punctuation.section.block.end.css */
/* same with recovery => handle it as expected, using pairing */
.test-parsing-errors { color{;color:maroon}; color:green }
/* ^^^^^^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
/* ^^^^^^^^^^^^^^^ meta.property-list.css meta.block.css meta.property-list.css meta.block.css */
/* ^^^^^^^^^^^^^^^ meta.property-list.css meta.block.css - meta.property-list meta.property-list - meta.block meta.block */
/* ^ - meta.property-list */
/* ^ punctuation.section.block.begin.css */
/* ^^^^^ meta.selector.css entity.name.tag.other.css */
/* ^ punctuation.section.block.begin.css */
/* ^ punctuation.terminator.rule.css */
/* ^^^^^ support.type.property-name.css */
/* ^ punctuation.separator.key-value.css */
/* ^^^^^^ support.constant.color.w3c.standard.css */
/* ^ punctuation.section.block.end.css */
/* ^ punctuation.terminator.rule.css */
/* ^^^^^ support.type.property-name.css */
/* ^ punctuation.separator.key-value.css */
/* ^^^^^ support.constant.color.w3c.standard.css */
/* ^ punctuation.section.block.end.css */
.test-generic-font-families {
font-family: my-serif, serif, inherit;
Expand Down Expand Up @@ -3422,33 +3420,32 @@
/* ^ punctuation.section.group.end.css */
/* ^ punctuation.terminator.rule.css */
// TODO: can't match the detail in unquoted strings
// top: url(foo/bar%20baz.php?page=10&func=test-._~:#[]\'\"@!$*+%,;(bad-url\)));
// /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - meta.function-call meta.function-call */
// /* ^^^ meta.function-call.identifier.css */
// /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.arguments.css meta.group.css */
// /* ^^ - meta.function-call */
// /* ^ - meta.string - meta.path */
// /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.path.url.css meta.string.css string.unquoted.css */
// /* ^^^^^^^^^^^^^ - meta.string - meta.path */
// /* ^^^ support.function.url.css */
// /* ^ punctuation.section.group.begin.css - string */
// /* ^ punctuation.separator.path.css */
// /* ^ constant.character.escape.url.css punctuation.definition.escape.css */
// /* ^^ constant.character.escape.url.css - punctuation */
// /* ^^^^^^^ - punctuation.separator.path */
// /* ^ punctuation.separator.path.css */
// /* ^^^^^^^ - punctuation.separator.path */
// /* ^ punctuation.separator.path.css */
// /* ^^^^^^^^^^^^^^ - punctuation.separator.path */
// /* ^ punctuation.separator.path.css */
// /* ^^ - punctuation.separator.path */
// /* ^^^^ constant.character.escape.css */
// /* ^ invalid.illegal.unexpected-token.css */
// /* ^^ constant.character.escape.css */
// /* ^ punctuation.section.group.end.css - string */
// /* ^ invalid.illegal.unexpected-token.css */
// /* ^ punctuation.terminator.rule.css */
top: url(foo/bar%20baz.php?page=10&func=test-._~:#[]\'\"@!$*+%,;(bad-url\)));
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - meta.function-call meta.function-call */
/* ^^^ meta.function-call.identifier.css */
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.arguments.css meta.group.css */
/* ^^ - meta.function-call */
/* ^ - meta.string - meta.path */
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.path.url.css meta.string.css string.unquoted.css */
/* ^^^^^^^^^^^^^ - meta.string - meta.path */
/* ^^^ support.function.url.css */
/* ^ punctuation.section.group.begin.css - string */
/* ^ punctuation.separator.path.css */
/* ^ constant.character.escape.url.css punctuation.definition.escape.css */
/* ^^ constant.character.escape.url.css - punctuation */
/* ^^^^^^^ - punctuation.separator.path */
/* ^ punctuation.separator.path.css */
/* ^^^^^^^ - punctuation.separator.path */
/* ^ punctuation.separator.path.css */
/* ^^^^^^^^^^^^^^ - punctuation.separator.path */
/* ^ punctuation.separator.path.css */
/* ^^ - punctuation.separator.path */
/* ^^^^ constant.character.escape.css */
/* ^ invalid.illegal.unexpected-token.css */
/* ^^ constant.character.escape.css */
/* ^ punctuation.section.group.end.css - string */
/* ^ invalid.illegal.unexpected-token.css */
/* ^ punctuation.terminator.rule.css */
top: url(var(--image));
/* ^^^ meta.function-call.identifier.css - meta.function-call meta.function-call */
Expand Down Expand Up @@ -4035,16 +4032,19 @@ img{
/* ^ variable.language.parent.css */
/* ^^^^^^^ entity.name.tag.html.css */

// TODO: this looks like a selector to SCSS
// article { ... }
// /* ^^^^^^^^ meta.property-list.css meta.block.css - meta.selector */
article { ... }
/* ^^^^^^^^ meta.property-list.css meta.block.css meta.selector.css */
/* ^^^^^^^ entity.name.tag.html.css */
}

.foo:bar > tr.baz[test], div p {
/* <- meta.selector.css entity.other.attribute-name.class.css punctuation.definition.entity.css */
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.selector.css */
// TODO: this looks like a selector to SCSS
foo:bar {
/* ^^^^^^^^ meta.property-list.css meta.block.css meta.selector.css */
/* ^^^ entity.name.tag.other.css */
/* ^ punctuation.definition.pseudo-class.css */
/* ^^^ entity.other.pseudo-class.css */
/* ^^ meta.property-list.css meta.block.css meta.property-list.css meta.block.css */
/* ^ punctuation.section.block.begin.css */
foo:bar;
Expand Down

0 comments on commit 6d4d7b9

Please sign in to comment.