From dfa0286aca8aeca49820ebb6a3b0e4461d30fe29 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Wed, 26 Jan 2022 14:35:49 +0300 Subject: [PATCH] feat(css/ast): Add types for dashed identifiers and `@color-profile` at-rules (#3364) --- .../swc_css_ast/src/at_rule/color_profile.rs | 17 + crates/swc_css_ast/src/at_rule/mod.rs | 20 +- crates/swc_css_ast/src/base.rs | 7 + crates/swc_css_ast/src/style_rule.rs | 12 +- crates/swc_css_ast/src/value.rs | 5 +- crates/swc_css_codegen/src/lib.rs | 47 +- crates/swc_css_parser/src/parser/at_rule.rs | 79 ++- .../swc_css_parser/src/parser/style_rule.rs | 29 +- crates/swc_css_parser/src/parser/value/mod.rs | 37 +- crates/swc_css_parser/tests/fixture.rs | 5 + .../fixture/at-rule/color-profile/input.css | 7 + .../fixture/at-rule/color-profile/output.json | 150 +++++ .../at-rule/color-profile/span.rust-debug | 180 ++++++ .../fixture/at-rule/font-face/span.rust-debug | 12 + .../fixture/at-rule/import/span.rust-debug | 132 ++++ .../fixture/at-rule/keyframe/span.rust-debug | 48 ++ .../fixture/at-rule/layer/span.rust-debug | 72 +++ .../fixture/at-rule/page/span.rust-debug | 36 ++ .../fixture/at-rule/supports/span.rust-debug | 180 ++++++ .../tests/fixture/at-rule/unknown/output.json | 30 +- .../fixture/at-rule/unknown/span.rust-debug | 180 ++++-- .../tests/fixture/bom/span.rust-debug | 6 + .../tests/fixture/comment/span.rust-debug | 24 + .../tests/fixture/dashed-ident/input.css | 15 + .../tests/fixture/dashed-ident/output.json | 578 ++++++++++++++++++ .../fixture/dashed-ident/span.rust-debug | 504 +++++++++++++++ .../fixture/declaration-list/span.rust-debug | 12 + .../tests/fixture/declaration/span.rust-debug | 30 + .../fixture/delim/backslash/span.rust-debug | 6 + .../fixture/dimension/basic/span.rust-debug | 42 ++ .../-4j83DwgJa0nPQIjlb0RIA/span.rust-debug | 6 + .../-GZJfOA9TK6La2KGGNgCkg/span.rust-debug | 6 + .../-JoxoRcnA-zaaEC7RjXKvQ/span.rust-debug | 6 + .../-edvtxlXMemv5jnGeyueBA/span.rust-debug | 6 + .../-gboAEi1zyjFW5mtEM24Rg/span.rust-debug | 6 + .../07tvJxvZrgDeTmptOclErA/span.rust-debug | 6 + .../0LKvnY2GhG7ss8EXa0t6tQ/span.rust-debug | 6 + .../12EwJCu6DsfOEJubQW9jLg/span.rust-debug | 12 + .../1naykwaIKZc6zuHRNIccLQ/span.rust-debug | 6 + .../2nNBhRWO2cNcBJf09zDxjw/span.rust-debug | 6 + .../36qnNuIUvbIrMnJKDxwE5A/span.rust-debug | 6 + .../375WZQg3bngUbuoHsqEIcA/span.rust-debug | 6 + .../39pbt1sIeFh8WWhCalZS4g/span.rust-debug | 6 + .../3EgMpLwjJNG0ht4U_r6cnw/span.rust-debug | 6 + .../3JGye8AhworwNFoUL1gKbg/span.rust-debug | 6 + .../3OV2jH0hrt2_2jOv6t4wvA/span.rust-debug | 6 + .../3a1KXFwtncypOUCwQI7IAw/span.rust-debug | 6 + .../4-S1C8qZOZ6Mm7WdRUH72Q/span.rust-debug | 6 + .../485Ns9qQHa89OJU5Lhjx-Q/span.rust-debug | 6 + .../486QvEO8dmLFsXYp6xgKVw/span.rust-debug | 6 + .../4Tjjgepnha63E4UiXXDNEA/span.rust-debug | 6 + .../4WSp4-HbKB-f1GLF00sf6A/span.rust-debug | 6 + .../53OltIbJ-YBXtSKedVvYwA/span.rust-debug | 6 + .../misc/5IxIPW9sKkvdZIzfV33AcA/output.json | 2 +- .../5IxIPW9sKkvdZIzfV33AcA/span.rust-debug | 12 +- .../5al65IRQbw_x4yG3ke74fQ/span.rust-debug | 6 + .../5cnGKjYPm1XBeqTmw3oCag/span.rust-debug | 6 + .../5yer6GUWydidDHrfgacUkA/span.rust-debug | 6 + .../6WYwXsqP1SJOa-6oDBobzQ/span.rust-debug | 6 + .../6aNPFn_YOBL4koYvV-g8pQ/span.rust-debug | 6 + .../6kUhG0W7hwZxIuaCsZ7pHg/span.rust-debug | 6 + .../7CK6ZYt4CWz7Ge5KWLKBYg/span.rust-debug | 6 + .../7YGXOizztR38f8fGB1DRaQ/span.rust-debug | 6 + .../misc/7q6h33W5r1sx-W3Q7DipjA/output.json | 2 +- .../7q6h33W5r1sx-W3Q7DipjA/span.rust-debug | 12 +- .../866Law8W0FQas7QMxFjUbw/span.rust-debug | 6 + .../8Gs_Q4kYqijbgIQ6xIW8qw/span.rust-debug | 6 + .../9IIa-42s3YQFw8ilk39GdQ/span.rust-debug | 6 + .../A3jvzrmJH_MIf_Uilsy4sg/span.rust-debug | 6 + .../ACQUsGVQAmGzhMqBRmS6Mw/span.rust-debug | 6 + .../ATZbhYBr7fOFJoZ4E2dwkA/span.rust-debug | 12 + .../AVaQlt9z0lhJC6bHHDPVeA/span.rust-debug | 6 + .../Afm91-TMNbzd52HsPrCCNA/span.rust-debug | 6 + .../AigZ338AGwCqF4M9a3Quqw/span.rust-debug | 6 + .../AocxkR5Gt30Hu6JV7J56Wg/span.rust-debug | 6 + .../AwZM5l5vBlyrbgG-Fk0_EQ/span.rust-debug | 6 + .../BKyQWW5j9vRP-kr41nqcjg/span.rust-debug | 6 + .../BrJMdtdKJAuIZIG5MVWUYA/span.rust-debug | 6 + .../C4I0cdQcSbpaGOS-V8fwew/span.rust-debug | 6 + .../C6gS3Kl0KEwGsFaUUGXzFg/span.rust-debug | 6 + .../CQiowK9DjojqKtlpQifemA/span.rust-debug | 6 + .../CiejHTPFd8U5szvvY3uRjw/span.rust-debug | 6 + .../CqrYlHva8qUNgSPb8EwWjg/span.rust-debug | 6 + .../Cz4vXE_NaBs6qNXE1kUyqQ/span.rust-debug | Bin 1682 -> 1822 bytes .../D5Oyf1ABeS8lie5Lg-5pqg/span.rust-debug | 6 + .../DrlXteRB-ppLVxi4_N4dhA/span.rust-debug | 6 + .../EJPa4WhTn_fRRrDiA2bczg/span.rust-debug | 6 + .../EYFn-trzBus37dDEvK1jUQ/span.rust-debug | 6 + .../ElFW4lY06Cb-VFYtK0WX4A/span.rust-debug | 6 + .../F-AbRDwG_3dGLhE7pzr5aA/span.rust-debug | 6 + .../FTOGKsI_y1QxMNEu_Fgq7Q/span.rust-debug | 6 + .../FlqjDLebWxQvNIxKppBllw/span.rust-debug | 6 + .../Fm7gvlx7uRyvrfzUC7rJxg/span.rust-debug | 6 + .../GC0pcFQY1xSlq9QsgSvEVg/span.rust-debug | 6 + .../GI1rffTXev-78n9ei_53wQ/span.rust-debug | 6 + .../GpePX8ZJM8IP14hXFTKKxQ/span.rust-debug | 6 + .../Gt3Lw4L5Pe4aLLDPz9cxRg/span.rust-debug | 12 + .../HDNE73X9waUrBkTAzz-20g/span.rust-debug | 6 + .../HWU09nmB9oZX7WY8zUbrnA/span.rust-debug | 6 + .../Jmhb8p_Oc2-nzkcDSk0dww/span.rust-debug | 6 + .../misc/L0mEf41IMkWcP7NotllkAg/output.json | 2 +- .../L0mEf41IMkWcP7NotllkAg/span.rust-debug | 12 +- .../LoeMqdekBkn3XKYHQFHOZA/span.rust-debug | 6 + .../MK5PGiCFMf7RHDp05gnDCw/span.rust-debug | 6 + .../MMBANlJKeKQw886fHOYiHA/span.rust-debug | 6 + .../MU8JgGd_-h5ocqkfawNxeQ/span.rust-debug | 6 + .../Mdtiu_Fpfso6gXZMciRJgw/span.rust-debug | 6 + .../MmOsa9XFdPMS9x4ITbWSzg/span.rust-debug | 6 + .../MxxFvoxSpp02tFmpbNdA8g/span.rust-debug | 6 + .../NGFFzFWLONNmgWPM_FpiZg/span.rust-debug | 6 + .../O2EvcnNp_CVyX3xq5-eM-g/span.rust-debug | 6 + .../OFqVy3cBzYnrIy6uze5Nuw/span.rust-debug | 6 + .../Oc6Obl7mbH-MlFllIoAbdg/span.rust-debug | 6 + .../OtM9lGhbFLqI-r3dvNTUjQ/span.rust-debug | 6 + .../PSncmPJMuHC-CjpwiYtkDw/span.rust-debug | 6 + .../Q_wA-fPw3o2m3R7gyWNxbQ/span.rust-debug | 6 + .../R6OYU1g_sB_euLV8Yzjw6w/span.rust-debug | 6 + .../misc/RgnvIbTq0R1ivptC3lTYbQ/output.json | 2 +- .../RgnvIbTq0R1ivptC3lTYbQ/span.rust-debug | 12 +- .../RmGccmub1dooAN8WPKTwhQ/span.rust-debug | 6 + .../Rq1DOaNCa5Dl2jaozalLXQ/span.rust-debug | 6 + .../S2Mhk5rU2YxQPgm9rtF9WA/span.rust-debug | 6 + .../SFBgyV9jnFbMzWZoo9VbSQ/span.rust-debug | 6 + .../misc/SnMCumHJazvlgOXgmxJ9Jg/output.json | 2 +- .../SnMCumHJazvlgOXgmxJ9Jg/span.rust-debug | 12 +- .../Ssg_Qhdw7h_c6ZtY52Qe4A/span.rust-debug | 6 + .../T1SOp4KXmIb1WNsyPFEKqg/span.rust-debug | 6 + .../TB0HbwEy-7bhtK7ck9tHKQ/span.rust-debug | 12 + .../TyMkoZpPOEhvUBOmUhGOXQ/span.rust-debug | 6 + .../U2nuhvtnEWZ_kMd6i7EDWA/span.rust-debug | 6 + .../Uuvi9sS4YR_ILpKl0xpfOg/span.rust-debug | 6 + .../VOQJsreB5pi_yJysozWgcA/span.rust-debug | 102 ++++ .../W3R-c5DPSkhG9QWYdcFdFg/span.rust-debug | 6 + .../Wb-aVu7CEQfCy1QL2yUrEw/span.rust-debug | 12 + .../Wplrqmb_IDjNC-o-eqLw4A/span.rust-debug | 6 + .../X-yuwO0x1B-l1Js4JkKJZg/span.rust-debug | 6 + .../X0UTnZK8bQhMRs3DGoqFAw/span.rust-debug | 6 + .../misc/XzgibMiqPC2Svd-zi3M4jA/output.json | 2 +- .../XzgibMiqPC2Svd-zi3M4jA/span.rust-debug | 12 +- .../YIW6UUMmxrTYJjJ3JSL3uQ/span.rust-debug | 6 + .../Yc70giIIGDIddrjD858dDw/span.rust-debug | 6 + .../Ys7z8C2qi5O_HM9ElZQrUQ/span.rust-debug | 6 + .../Z4J4sVA4UnGhTMiN5tdMMQ/span.rust-debug | 6 + .../misc/_-29x4xnx6IaJMmYrOsypA/output.json | 2 +- .../_-29x4xnx6IaJMmYrOsypA/span.rust-debug | 12 +- .../misc/_5pJ5Q6EBxzG4SOkB9Qoow/output.json | 2 +- .../_5pJ5Q6EBxzG4SOkB9Qoow/span.rust-debug | 12 +- .../_APxY5Pe47Bb71-CwD1nhw/span.rust-debug | 6 + .../misc/_PPlU8tyR27_briQT0VeOg/output.json | 2 +- .../_PPlU8tyR27_briQT0VeOg/span.rust-debug | 12 +- .../_U4zAUbS93Xo7_tJOolGuA/span.rust-debug | 6 + .../a0Yurt7E7InOYieD7nMCXg/span.rust-debug | 6 + .../a7KElWOMF9ilrSsoliHkcg/span.rust-debug | 6 + .../aDkLP2LEPmyD_ImzrGw8SQ/span.rust-debug | 6 + .../aVoVLZHijXjMsJvx4rbJGQ/span.rust-debug | 6 + .../avMO0PRST3qaooxANKWiIw/span.rust-debug | 12 + .../axTS8OYqxbJ3cRQm9h4ZYA/span.rust-debug | 6 + .../b102IE1MrM3aGTKCRrSU6Q/span.rust-debug | 6 + .../b2m1STf0F5CKity6Nd4vmQ/span.rust-debug | 6 + .../b6WBp-DsAKNB9xg6pcRTzQ/span.rust-debug | 6 + .../bMhJJBpJJs8SIl3cQ4UjFw/span.rust-debug | 6 + .../bO5VdzMYGbUbK2CCYCMKTA/span.rust-debug | 6 + .../bdiLSVQWZCfQNNwD_OM6qA/span.rust-debug | 6 + .../biImEvafuG5pEuEW8LgCCw/span.rust-debug | 6 + .../cFk0V1dktTRk2wWOux0Y9A/span.rust-debug | 6 + .../cGdUJvMcb_06jPxvv8lGkg/span.rust-debug | 6 + .../ccwWSeXA2f9cTFtUANZA8Q/span.rust-debug | 6 + .../cfNrGQbCQ18L8pQmD7lBZQ/span.rust-debug | 18 + .../cxYYDM0_rXbkvaqi8UPWOg/span.rust-debug | 6 + .../d6iTYxGk5HHi4hIZcn73Bw/span.rust-debug | 6 + .../d8Q6MceynW9-IQJ4l0OGzA/span.rust-debug | 6 + .../dCIAD8Ab98J4V9rGaJvZlw/span.rust-debug | 6 + .../dVUzkh7NtbXySLzWGW0t9g/span.rust-debug | 18 + .../eHdhrm6W2iHKQegxH7uEgw/span.rust-debug | 6 + .../misc/eP2iXsnOY42u7Q_IcchPZA/output.json | 2 +- .../eP2iXsnOY42u7Q_IcchPZA/span.rust-debug | 12 +- .../eVSpM_pYsIvyyewUkjTa2A/span.rust-debug | 6 + .../eWp7_8m3btY6p4erQ5c2JQ/span.rust-debug | 6 + .../egyt9Hk9xnn2Xfbi3Ckfrg/span.rust-debug | 6 + .../eivsIn6ub-xYiqErLqd8oA/span.rust-debug | 6 + .../fTZzFds73kLZoyY9Y2gZdQ/span.rust-debug | 6 + .../fmt94qCRfRXbpej5kzLZUw/span.rust-debug | 6 + .../ftc5-zf_sliOrFRRBGGS-g/span.rust-debug | 6 + .../gPpnAqOuxEdLAEJjFaUEkg/span.rust-debug | 6 + .../gVzUgfEllenh46I3Psx-uQ/span.rust-debug | 6 + .../gxBoWO36fKxIuYwPzrWyKQ/span.rust-debug | 6 + .../inMW5rttJFPDfH0aKVFg_Q/span.rust-debug | 6 + .../isfWm5W8qb6_aJSz_bdwDw/span.rust-debug | 6 + .../j9dr5-Ih68VDH1exMwsmZA/span.rust-debug | 6 + .../jD_IvFQVk8LtCrictrWpxw/span.rust-debug | 6 + .../jbIIxHeXTPO0PtiubVziHQ/span.rust-debug | 12 + .../kVdd5WJZqKSou4cGvcL40g/span.rust-debug | 6 + .../mJEhy0k_dxoszsTVHb3x_Q/span.rust-debug | 6 + .../mn3ADjaNJuY6IF0Nqms-VQ/span.rust-debug | 6 + .../mx296i8q4HfA0IzZ055Xpw/span.rust-debug | 6 + .../nTOoTMumkTvMLx_Y_al5RQ/span.rust-debug | 6 + .../niufyVEBI4s-ZqSXdfhptA/span.rust-debug | 6 + .../nlYSjWzJfpf38YhsJNbwmA/span.rust-debug | 6 + .../oj5Yn0RxnGFEbVphKqrL2Q/span.rust-debug | 6 + .../ottVCVON2IlQB3WCD-lu_A/span.rust-debug | Bin 1700 -> 1841 bytes .../pO8ANIJaeZDUsUBCBMKErg/span.rust-debug | 6 + .../pQWwEpWgxuUS6-uSAJR0nQ/span.rust-debug | 6 + .../pTW2Z7kJ0nR_yQzsOsjAwQ/span.rust-debug | 6 + .../ptR_ezJzwIRsP3geOEZI5A/span.rust-debug | 6 + .../qgkE_nOj4HtPukMzEjCY5w/span.rust-debug | 6 + .../qmXSF9N8euK5gfPoFGmV_Q/span.rust-debug | 6 + .../rAzJtA56igpCO-gN3gRrYw/span.rust-debug | 6 + .../rPWYt0NoxD_TvsI8Xrhvyg/span.rust-debug | 6 + .../rZIFO-RMBeLmmQK8U6nNmQ/span.rust-debug | 6 + .../sPEO1vW1kIUNhCVdR2d7fg/span.rust-debug | 6 + .../misc/t7nlfNtXN3n8Gh7wpJvmug/output.json | 2 +- .../t7nlfNtXN3n8Gh7wpJvmug/span.rust-debug | 12 +- .../tJNGkqEMVKFfOWjyOm5TSg/span.rust-debug | 6 + .../uWMeE1AAowARdci8tkE-cg/span.rust-debug | 12 + .../ugX8SLCLRvWN-wDCK7ouyA/span.rust-debug | 6 + .../uxHrqNkMo_2PTuF8sIRQxA/span.rust-debug | 6 + .../vCiwe_ipn8ReAa4wyU52Ng/span.rust-debug | 6 + .../vFNgwFW2EHA0WTOoSWhSTg/span.rust-debug | 6 + .../vIco-E1oKlSzuggLOcviNg/span.rust-debug | 6 + .../vK9rUBJhwa0FsjBe18lL0w/span.rust-debug | 6 + .../vN7xRB9YekSqanW68eIoNA/span.rust-debug | 6 + .../wEB80kxMinK4EZaPb3My1A/span.rust-debug | 6 + .../wwLEw52LUKMFH3Wp5CaBAQ/span.rust-debug | 6 + .../xVWGh0UpWtRUrgqbJEENWA/span.rust-debug | 6 + .../xVqT8wNU4CEhaDlbLxGyaw/span.rust-debug | 6 + .../xc1mD3YfHByTKL-N-FL49A/span.rust-debug | 6 + .../xdJ7w6fdV3po3r2aWrgPdA/span.rust-debug | 6 + .../yOHW3TOE35U7DAf9Hn7-Ew/span.rust-debug | 6 + .../yVqdwpiB7OK23Te5mXKdFw/span.rust-debug | 6 + .../yboE7Tr5zjKHy9-m10AZTg/span.rust-debug | 6 + .../zUuWz4A8Y6yZO8JMLAe2fQ/span.rust-debug | 6 + .../zz_B6vK87VUHpkOMFR_R1g/span.rust-debug | 6 + .../fixture/function/url/span.rust-debug | 156 +++++ .../tests/fixture/hex-colors/span.rust-debug | 66 ++ .../fixture/important/basic/span.rust-debug | 90 +++ .../tests/fixture/number/span.rust-debug | 204 +++++++ .../fixture/property/escaped/span.rust-debug | 6 + .../page-margin-properties/span.rust-debug | 6 + .../span.rust-debug | 6 + .../at-page/page-properties/span.rust-debug | 6 + .../fixture/rome/at-page/span.rust-debug | 48 ++ .../tests/fixture/rome/calc/span.rust-debug | 48 ++ .../fixture/rome/comment/span.rust-debug | 18 + .../rome/custom-properties/output.json | 42 +- .../rome/custom-properties/span.rust-debug | 168 ++++- .../fixture/rome/fit-content/span.rust-debug | 6 + .../tests/fixture/rome/font/span.rust-debug | 6 + .../tests/fixture/rome/functions/output.json | 4 +- .../fixture/rome/functions/span.rust-debug | 40 +- .../fixture/rome/grid/minmax/span.rust-debug | 6 + .../grid/repeat/fit-content/span.rust-debug | 6 + .../rome/grid/repeat/flex/span.rust-debug | 6 + .../grid/repeat/line-name/span.rust-debug | 6 + .../rome/grid/repeat/minmax/span.rust-debug | 6 + .../grid/repeat/multi-values/span.rust-debug | 6 + .../fixture/rome/keyframe/span.rust-debug | 12 + .../fixture/rome/min-and-max/span.rust-debug | 60 ++ .../fixture/rome/selectors/span.rust-debug | 24 + .../tests/fixture/rome/smoke/span.rust-debug | 12 + .../fixture/rome/supports/span.rust-debug | 48 ++ .../tests/fixture/rome/values/span.rust-debug | 48 ++ .../fixture/selector/nesting/span.rust-debug | 6 + .../selector/universal/span.rust-debug | 6 + .../styled-jsx/selector/1/span.rust-debug | 6 + .../styled-jsx/selector/2/span.rust-debug | 6 + .../fixture/stylis/comma/01/span.rust-debug | 6 + .../fixture/value/custom-property/output.json | 78 +-- .../value/custom-property/span.rust-debug | 312 ++++++++-- .../fixture/value/escaped/span.rust-debug | 6 + .../fixture/value/quotes/span.rust-debug | 126 ++++ .../value/square-brackets/span.rust-debug | 36 ++ .../tests/fixture/value/url/output.json | 8 +- .../tests/fixture/value/url/span.rust-debug | 122 +++- .../tests/fixture/vercel/001/span.rust-debug | 6 + .../tests/fixture/vercel/002/span.rust-debug | 6 + .../recovery/at-rule/import/empty/output.json | 4 +- .../at-rule/import/indent/output.json | 4 +- .../at-rule/import/no-semi/output.json | 4 +- .../keyframes/custom-ident-1/output.json | 4 +- .../keyframes/custom-ident-2/output.json | 4 +- .../keyframes/custom-ident-3/output.json | 4 +- .../keyframes/custom-ident-4/output.json | 4 +- .../keyframes/custom-ident/output.json | 4 +- .../at-rule/keyframes/empty-name/output.json | 4 +- .../keyframes/keyframe-number/output.json | 4 +- .../recovery/at-rule/layer/block/output.json | 4 +- .../recovery/at-rule/layer/empty/output.json | 4 +- .../layer/string-name-block/output.json | 4 +- .../layer/string-name-statement/output.json | 4 +- .../at-rule/media/condition-1/output.json | 4 +- .../media/condition-and-or/output.json | 4 +- .../at-rule/media/condition/output.json | 4 +- .../at-rule/media/feature-name-1/output.json | 4 +- .../at-rule/media/feature-name-2/output.json | 4 +- .../at-rule/media/feature-name/output.json | 4 +- .../at-rule/media/feature-range-1/output.json | 4 +- .../at-rule/media/feature-range-2/output.json | 4 +- .../at-rule/media/feature-range-3/output.json | 4 +- .../at-rule/media/feature-range-4/output.json | 4 +- .../at-rule/media/feature-range-5/output.json | 4 +- .../at-rule/media/feature-range-6/output.json | 4 +- .../at-rule/media/feature-range/output.json | 4 +- .../at-rule/media/feature/output.json | 4 +- .../recovery/at-rule/media/ratio/output.json | 4 +- .../at-rule/supports/no-parens/output.json | 4 +- .../at-rule/supports/wrong-or-and/output.json | 4 +- .../recovery/at-rule/unknown/output.json | 2 +- .../tests/recovery/value/url/output.json | 2 +- crates/swc_css_visit/src/lib.rs | 34 +- crates/swc_stylis/src/prefixer.rs | 56 +- 310 files changed, 5660 insertions(+), 340 deletions(-) create mode 100644 crates/swc_css_ast/src/at_rule/color_profile.rs create mode 100644 crates/swc_css_parser/tests/fixture/at-rule/color-profile/input.css create mode 100644 crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json create mode 100644 crates/swc_css_parser/tests/fixture/at-rule/color-profile/span.rust-debug create mode 100644 crates/swc_css_parser/tests/fixture/dashed-ident/input.css create mode 100644 crates/swc_css_parser/tests/fixture/dashed-ident/output.json create mode 100644 crates/swc_css_parser/tests/fixture/dashed-ident/span.rust-debug diff --git a/crates/swc_css_ast/src/at_rule/color_profile.rs b/crates/swc_css_ast/src/at_rule/color_profile.rs new file mode 100644 index 00000000000..2d6bcf6047d --- /dev/null +++ b/crates/swc_css_ast/src/at_rule/color_profile.rs @@ -0,0 +1,17 @@ +use crate::{DashedIdent, DeclarationBlockItem, Ident}; +use swc_common::{ast_node, Span}; + +#[ast_node] +pub enum ColorProfileName { + #[tag("DashedIdent")] + DashedIdent(DashedIdent), + #[tag("Ident")] + Ident(Ident), +} + +#[ast_node("ColorProfileRule")] +pub struct ColorProfileRule { + pub span: Span, + pub name: ColorProfileName, + pub block: Vec, +} diff --git a/crates/swc_css_ast/src/at_rule/mod.rs b/crates/swc_css_ast/src/at_rule/mod.rs index c8e98777160..83a51861d61 100644 --- a/crates/swc_css_ast/src/at_rule/mod.rs +++ b/crates/swc_css_ast/src/at_rule/mod.rs @@ -1,11 +1,13 @@ pub use self::{ - charset::*, document::*, import::*, keyframe::*, layer::*, media::*, page::*, support::*, + charset::*, color_profile::*, document::*, import::*, keyframe::*, layer::*, media::*, page::*, + support::*, }; -use crate::{Block, Ident, SimpleBlock, Str, Url, Value}; +use crate::{Block, DashedIdent, Ident, SimpleBlock, Str, Url, Value}; use is_macro::Is; use swc_common::{ast_node, Span}; mod charset; +mod color_profile; mod document; mod import; mod keyframe; @@ -50,6 +52,9 @@ pub enum AtRule { #[tag("DocumentRule")] Document(DocumentRule), + #[tag("ColorProfileRule")] + ColorProfile(ColorProfileRule), + #[tag("UnknownAtRule")] Unknown(UnknownAtRule), } @@ -82,10 +87,19 @@ pub struct ViewportRule { pub block: Block, } +#[ast_node] +pub enum AtRuleName { + #[tag("DashedIdent")] + DashedIdent(DashedIdent), + + #[tag("Ident")] + Ident(Ident), +} + #[ast_node("UnknownAtRule")] pub struct UnknownAtRule { pub span: Span, - pub name: Ident, + pub name: AtRuleName, pub prelude: Vec, pub block: Option, } diff --git a/crates/swc_css_ast/src/base.rs b/crates/swc_css_ast/src/base.rs index 7f08736fc1f..cabfb7f8209 100644 --- a/crates/swc_css_ast/src/base.rs +++ b/crates/swc_css_ast/src/base.rs @@ -15,6 +15,13 @@ pub struct CustomIdent { pub raw: JsWord, } +#[ast_node("DashedIdentifier")] +pub struct DashedIdent { + pub span: Span, + pub value: JsWord, + pub raw: JsWord, +} + /// Quoted string. #[ast_node("String")] pub struct Str { diff --git a/crates/swc_css_ast/src/style_rule.rs b/crates/swc_css_ast/src/style_rule.rs index 85ba2f0b41f..30f1a8221b2 100644 --- a/crates/swc_css_ast/src/style_rule.rs +++ b/crates/swc_css_ast/src/style_rule.rs @@ -1,4 +1,4 @@ -use crate::{AtRule, Ident, SelectorList, Tokens, Value}; +use crate::{AtRule, DashedIdent, Ident, SelectorList, Tokens, Value}; use swc_common::{ast_node, Span}; #[ast_node("SimpleBlock")] @@ -33,10 +33,18 @@ pub enum DeclarationBlockItem { AtRule(AtRule), } +#[ast_node] +pub enum DeclarationProperty { + #[tag("Ident")] + Ident(Ident), + #[tag("DashedIdent")] + DashedIdent(DashedIdent), +} + #[ast_node("Declaration")] pub struct Declaration { pub span: Span, - pub property: Ident, + pub property: DeclarationProperty, pub value: Vec, /// The span includes `!` pub important: Option, diff --git a/crates/swc_css_ast/src/value.rs b/crates/swc_css_ast/src/value.rs index 5e12729178f..30d22a6e191 100644 --- a/crates/swc_css_ast/src/value.rs +++ b/crates/swc_css_ast/src/value.rs @@ -1,4 +1,4 @@ -use crate::{Ident, SimpleBlock, Str, Tokens}; +use crate::{DashedIdent, Ident, SimpleBlock, Str, Tokens}; use string_enum::StringEnum; use swc_atoms::JsWord; use swc_common::{ast_node, EqIgnoreSpan, Span}; @@ -26,6 +26,9 @@ pub enum Value { #[tag("Ident")] Ident(Ident), + #[tag("DashedIdent")] + DashedIdent(DashedIdent), + #[tag("String")] Str(Str), diff --git a/crates/swc_css_codegen/src/lib.rs b/crates/swc_css_codegen/src/lib.rs index f4019d759c9..7187b479ede 100644 --- a/crates/swc_css_codegen/src/lib.rs +++ b/crates/swc_css_codegen/src/lib.rs @@ -79,6 +79,7 @@ where AtRule::Namespace(n) => emit!(self, n), AtRule::Viewport(n) => emit!(self, n), AtRule::Document(n) => emit!(self, n), + AtRule::ColorProfile(n) => emit!(self, n), AtRule::Unknown(n) => emit!(self, n), } } @@ -572,6 +573,7 @@ where Value::Ratio(n) => emit!(self, n), Value::Hash(n) => emit!(self, n), Value::Ident(n) => emit!(self, n), + Value::DashedIdent(n) => emit!(self, n), Value::Str(n) => emit!(self, n), Value::Bin(n) => emit!(self, n), Value::Space(n) => emit!(self, n), @@ -582,6 +584,33 @@ where } } + #[emitter] + fn emit_at_rule_name(&mut self, n: &AtRuleName) -> Result { + match n { + AtRuleName::Ident(n) => emit!(self, n), + AtRuleName::DashedIdent(n) => emit!(self, n), + } + } + + #[emitter] + fn emit_color_profile_name(&mut self, n: &ColorProfileName) -> Result { + match n { + ColorProfileName::Ident(n) => emit!(self, n), + ColorProfileName::DashedIdent(n) => emit!(self, n), + } + } + + #[emitter] + fn emit_color_profile_rule(&mut self, n: &ColorProfileRule) -> Result { + punct!(self, "@"); + keyword!(self, "color-profile"); + space!(self); + emit!(self, n.name); + punct!(self, "{"); + self.emit_list(&n.block, ListFormat::NotDelimited)?; + punct!(self, "}"); + } + #[emitter] fn emit_unknown_at_rule(&mut self, n: &UnknownAtRule) -> Result { punct!(self, "@"); @@ -642,12 +671,23 @@ where } } + #[emitter] + fn emit_declaration_property(&mut self, n: &DeclarationProperty) -> Result { + match n { + DeclarationProperty::Ident(n) => emit!(self, n), + DeclarationProperty::DashedIdent(n) => emit!(self, n), + } + } + #[emitter] fn emit_declaration(&mut self, n: &Declaration) -> Result { emit!(self, n.property); punct!(self, ":"); - let is_custom_property = n.property.value.starts_with("--"); + let is_custom_property = match n.property { + DeclarationProperty::DashedIdent(_) => true, + DeclarationProperty::Ident(_) => false, + }; if !is_custom_property { formatting_space!(self); @@ -685,6 +725,11 @@ where self.wr.write_raw(Some(n.span), &n.raw)?; } + #[emitter] + fn emit_dashed_ident(&mut self, n: &DashedIdent) -> Result { + self.wr.write_raw(Some(n.span), &n.raw)?; + } + #[emitter] fn emit_keyframe_block_rule(&mut self, n: &KeyframeBlockRule) -> Result { match n { diff --git a/crates/swc_css_parser/src/parser/at_rule.rs b/crates/swc_css_parser/src/parser/at_rule.rs index 9d6adfa679e..254ab1636eb 100644 --- a/crates/swc_css_parser/src/parser/at_rule.rs +++ b/crates/swc_css_parser/src/parser/at_rule.rs @@ -4,7 +4,7 @@ use crate::{ parser::{Ctx, RuleContext}, Parse, }; -use swc_common::Span; +use swc_common::{BytePos, Span}; use swc_css_ast::*; #[derive(Debug, Default)] @@ -195,21 +195,54 @@ where } } + "color-profile" => { + self.input.skip_ws()?; + + let at_rule_color_profile = self.parse(); + + if at_rule_color_profile.is_ok() { + return at_rule_color_profile + .map(|mut r: ColorProfileRule| { + r.span.lo = at_rule_span.lo; + r + }) + .map(AtRule::ColorProfile); + } + } + _ => {} } self.input.reset(&state); + let name = if name.0.starts_with("--") { + AtRuleName::DashedIdent(DashedIdent { + span: Span::new( + at_rule_span.lo + BytePos(1), + at_rule_span.hi, + Default::default(), + ), + value: name.0, + raw: name.1, + }) + } else { + AtRuleName::Ident(Ident { + span: Span::new( + at_rule_span.lo + BytePos(1), + at_rule_span.hi, + Default::default(), + ), + value: name.0, + raw: name.1, + }) + }; + // Consume the next input token. Create a new at-rule with its name set to the // value of the current input token, its prelude initially set to an empty list, // and its value initially set to nothing. let mut at_rule = UnknownAtRule { span: span!(self, at_rule_span.lo), - name: Ident { - span: span!(self, at_rule_span.lo), - value: name.0, - raw: name.1, - }, + name, prelude: vec![], block: None, }; @@ -1543,3 +1576,37 @@ where }) } } + +impl Parse for Parser +where + I: ParserInput, +{ + fn parse(&mut self) -> PResult { + let span = self.input.cur_span()?; + + let name = match cur!(self) { + Token::Ident { value, .. } => { + if value.starts_with("--") { + ColorProfileName::DashedIdent(self.parse()?) + } else { + ColorProfileName::Ident(self.parse()?) + } + } + _ => { + return Err(Error::new(span, ErrorKind::Expected("ident"))); + } + }; + + expect!(self, "{"); + + let block = self.parse()?; + + expect!(self, "}"); + + Ok(ColorProfileRule { + span: span!(self, span.lo), + name, + block, + }) + } +} diff --git a/crates/swc_css_parser/src/parser/style_rule.rs b/crates/swc_css_parser/src/parser/style_rule.rs index 0384a133542..f463c404314 100644 --- a/crates/swc_css_parser/src/parser/style_rule.rs +++ b/crates/swc_css_parser/src/parser/style_rule.rs @@ -203,11 +203,28 @@ where I: ParserInput, { fn parse(&mut self) -> PResult { - let start = self.input.cur_span()?.lo; + let span = self.input.cur_span()?; self.input.skip_ws()?; - let property: Ident = self.parse()?; + let is_dashed_ident = match cur!(self) { + Token::Ident { value, .. } => { + if value.starts_with("--") { + true + } else { + false + } + } + _ => { + return Err(Error::new(span, ErrorKind::Expected("Ident"))); + } + }; + + let property = if is_dashed_ident { + DeclarationProperty::DashedIdent(self.parse()?) + } else { + DeclarationProperty::Ident(self.parse()?) + }; self.input.skip_ws()?; @@ -217,13 +234,13 @@ where let mut value = vec![]; if !is!(self, EOF) { - match &*property.value { - str if str.starts_with("--") => { + match is_dashed_ident { + true => { let tokens = Value::Tokens(self.parse_declaration_value()?); value.push(tokens); } - _ => { + false => { let ctx = Ctx { allow_operation_in_value: false, recover_from_property_value: true, @@ -273,7 +290,7 @@ where self.input.skip_ws()?; Ok(Declaration { - span: Span::new(start, end, Default::default()), + span: Span::new(span.lo, end, Default::default()), property, value, important, diff --git a/crates/swc_css_parser/src/parser/value/mod.rs b/crates/swc_css_parser/src/parser/value/mod.rs index fb240936030..c39fcabff9e 100644 --- a/crates/swc_css_parser/src/parser/value/mod.rs +++ b/crates/swc_css_parser/src/parser/value/mod.rs @@ -293,7 +293,13 @@ where tok!("dimension") => return self.parse_numeric_value(), - tok!("ident") => return Ok(Value::Ident(self.parse()?)), + Token::Ident { value, .. } => { + if value.starts_with("--") { + return Ok(Value::DashedIdent(self.parse()?)); + }; + + return Ok(Value::Ident(self.parse()?)); + } tok!("[") => return self.parse_square_brackets_value().map(From::from), @@ -661,6 +667,35 @@ where } } +impl Parse for Parser +where + I: ParserInput, +{ + fn parse(&mut self) -> PResult { + let span = self.input.cur_span()?; + + if !is!(self, Ident) { + return Err(Error::new(span, ErrorKind::Expected("Ident"))); + } + + match bump!(self) { + Token::Ident { value, raw } => { + if !value.starts_with("--") { + return Err(Error::new( + span, + ErrorKind::Expected("'--' at the start of dashed-ident"), + )); + } + + Ok(DashedIdent { span, value, raw }) + } + _ => { + unreachable!() + } + } + } +} + impl Parse for Parser where I: ParserInput, diff --git a/crates/swc_css_parser/tests/fixture.rs b/crates/swc_css_parser/tests/fixture.rs index 47223da4bc5..8b8084ec42b 100644 --- a/crates/swc_css_parser/tests/fixture.rs +++ b/crates/swc_css_parser/tests/fixture.rs @@ -299,6 +299,7 @@ impl Visit for SpanVisualizer<'_> { mtd!(Number, visit_number); mtd!(Ratio, visit_ratio); mtd!(Percent, visit_percent); + mtd!(DeclarationProperty, visit_declaration_property); mtd!(Declaration, visit_declaration); mtd!(Nth, visit_nth); mtd!(AnPlusB, visit_an_plus_b); @@ -313,6 +314,7 @@ impl Visit for SpanVisualizer<'_> { mtd!(TagSelector, visit_tag_selector); mtd!(Ident, visit_ident); mtd!(CustomIdent, visit_custom_ident); + mtd!(DashedIdent, visit_dashed_ident); mtd!(Tokens, visit_tokens); mtd!(Unit, visit_unit); mtd!(UnitValue, visit_unit_value); @@ -376,8 +378,11 @@ impl Visit for SpanVisualizer<'_> { mtd!(PageRuleBlock, visit_page_rule_block); mtd!(PageRuleBlockItem, visit_page_rule_block_item); mtd!(PageSelector, visit_page_selector); + mtd!(AtRuleName, visit_at_rule_name); mtd!(UnknownAtRule, visit_unknown_at_rule); mtd!(ViewportRule, visit_viewport_rule); + mtd!(ColorProfileName, visit_color_profile_name); + mtd!(ColorProfileRule, visit_color_profile_rule); fn visit_token_and_span(&mut self, n: &TokenAndSpan) { self.handler diff --git a/crates/swc_css_parser/tests/fixture/at-rule/color-profile/input.css b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/input.css new file mode 100644 index 00000000000..842a0278bee --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/input.css @@ -0,0 +1,7 @@ +@color-profile --fogra39 { + src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); +} + +@color-profile device-cmyk { + src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); +} diff --git a/crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json new file mode 100644 index 00000000000..5fdf68421e4 --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json @@ -0,0 +1,150 @@ +{ + "type": "Stylesheet", + "span": { + "start": 0, + "end": 222, + "ctxt": 0 + }, + "rules": [ + { + "type": "ColorProfileRule", + "span": { + "start": 0, + "end": 94, + "ctxt": 0 + }, + "name": { + "type": "DashedIdentifier", + "span": { + "start": 15, + "end": 24, + "ctxt": 0 + }, + "value": "--fogra39", + "raw": "--fogra39" + }, + "block": [ + { + "type": "Declaration", + "span": { + "start": 31, + "end": 91, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 31, + "end": 34, + "ctxt": 0 + }, + "value": "src", + "raw": "src" + }, + "value": [ + { + "type": "Url", + "span": { + "start": 36, + "end": 91, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 36, + "end": 39, + "ctxt": 0 + }, + "value": "url", + "raw": "url" + }, + "value": { + "type": "String", + "span": { + "start": 40, + "end": 90, + "ctxt": 0 + }, + "value": "https://example.org/Coated_Fogra39L_VIGC_300.icc", + "raw": "'https://example.org/Coated_Fogra39L_VIGC_300.icc'" + }, + "modifiers": [] + } + ], + "important": null + } + ] + }, + { + "type": "ColorProfileRule", + "span": { + "start": 96, + "end": 221, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 111, + "end": 122, + "ctxt": 0 + }, + "value": "device-cmyk", + "raw": "device-cmyk" + }, + "block": [ + { + "type": "Declaration", + "span": { + "start": 129, + "end": 218, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 129, + "end": 132, + "ctxt": 0 + }, + "value": "src", + "raw": "src" + }, + "value": [ + { + "type": "Url", + "span": { + "start": 134, + "end": 218, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 134, + "end": 137, + "ctxt": 0 + }, + "value": "url", + "raw": "url" + }, + "value": { + "type": "String", + "span": { + "start": 138, + "end": 217, + "ctxt": 0 + }, + "value": "https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc", + "raw": "'https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'" + }, + "modifiers": [] + } + ], + "important": null + } + ] + } + ] +} diff --git a/crates/swc_css_parser/tests/fixture/at-rule/color-profile/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/span.rust-debug new file mode 100644 index 00000000000..de6b4ab916a --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/span.rust-debug @@ -0,0 +1,180 @@ +error: Stylesheet + --> $DIR/tests/fixture/at-rule/color-profile/input.css:1:1 + | +1 | / @color-profile --fogra39 { +2 | | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); +3 | | } +4 | | +5 | | @color-profile device-cmyk { +6 | | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); +7 | | } + | |__^ + +error: Rule + --> $DIR/tests/fixture/at-rule/color-profile/input.css:1:1 + | +1 | / @color-profile --fogra39 { +2 | | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); +3 | | } + | |_^ + +error: AtRule + --> $DIR/tests/fixture/at-rule/color-profile/input.css:1:1 + | +1 | / @color-profile --fogra39 { +2 | | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); +3 | | } + | |_^ + +error: ColorProfileRule + --> $DIR/tests/fixture/at-rule/color-profile/input.css:1:1 + | +1 | / @color-profile --fogra39 { +2 | | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); +3 | | } + | |_^ + +error: ColorProfileName + --> $DIR/tests/fixture/at-rule/color-profile/input.css:1:16 + | +1 | @color-profile --fogra39 { + | ^^^^^^^^^ + +error: DashedIdent + --> $DIR/tests/fixture/at-rule/color-profile/input.css:1:16 + | +1 | @color-profile --fogra39 { + | ^^^^^^^^^ + +error: Declaration + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:5 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:5 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:5 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^ + +error: Value + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:10 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Url + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:10 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:10 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^ + +error: UrlValue + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:14 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Str + --> $DIR/tests/fixture/at-rule/color-profile/input.css:2:14 + | +2 | src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Rule + --> $DIR/tests/fixture/at-rule/color-profile/input.css:5:1 + | +5 | / @color-profile device-cmyk { +6 | | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); +7 | | } + | |_^ + +error: AtRule + --> $DIR/tests/fixture/at-rule/color-profile/input.css:5:1 + | +5 | / @color-profile device-cmyk { +6 | | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); +7 | | } + | |_^ + +error: ColorProfileRule + --> $DIR/tests/fixture/at-rule/color-profile/input.css:5:1 + | +5 | / @color-profile device-cmyk { +6 | | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); +7 | | } + | |_^ + +error: ColorProfileName + --> $DIR/tests/fixture/at-rule/color-profile/input.css:5:16 + | +5 | @color-profile device-cmyk { + | ^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/color-profile/input.css:5:16 + | +5 | @color-profile device-cmyk { + | ^^^^^^^^^^^ + +error: Declaration + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:5 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:5 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:5 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^ + +error: Value + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:10 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Url + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:10 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:10 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^ + +error: UrlValue + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:14 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Str + --> $DIR/tests/fixture/at-rule/color-profile/input.css:6:14 + | +6 | src: url('https://drafts.csswg.org/css-color-4/ICCprofiles/Coated_Fogra39L_VIGC_300.icc'); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + diff --git a/crates/swc_css_parser/tests/fixture/at-rule/font-face/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/font-face/span.rust-debug index ad15c362716..a091add93ec 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/font-face/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/at-rule/font-face/span.rust-debug @@ -55,6 +55,12 @@ error: Declaration 2 | font-family: "Open Sans"; | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/font-face/input.css:2:5 + | +2 | font-family: "Open Sans"; + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/font-face/input.css:2:5 | @@ -80,6 +86,12 @@ error: Declaration 4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); | |______________________________________________________________^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/font-face/input.css:3:5 + | +3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + | ^^^ + error: Ident --> $DIR/tests/fixture/at-rule/font-face/input.css:3:5 | diff --git a/crates/swc_css_parser/tests/fixture/at-rule/import/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/import/span.rust-debug index f9b08100416..749b8494a70 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/import/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/at-rule/import/span.rust-debug @@ -1018,6 +1018,12 @@ error: Declaration 19 | @import url("narrow.css") supports(display: flex) handheld and (max-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:19:36 + | +19 | @import url("narrow.css") supports(display: flex) handheld and (max-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:19:36 | @@ -1180,6 +1186,12 @@ error: Declaration 20 | @import url("narrow.css") SUPPORTS(display: flex) handheld and (max-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:20:36 + | +20 | @import url("narrow.css") SUPPORTS(display: flex) handheld and (max-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:20:36 | @@ -1372,6 +1384,12 @@ error: Declaration 21 | @import url("fallback-layout.css") supports(not (display: flex)); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:21:50 + | +21 | @import url("fallback-layout.css") supports(not (display: flex)); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:21:50 | @@ -4666,6 +4684,12 @@ error: Declaration 108 | @import "test.css" supports(display: flex); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:108:29 + | +108 | @import "test.css" supports(display: flex); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:108:29 | @@ -4726,6 +4750,12 @@ error: Declaration 109 | @import "test.css" supports(display: flex) screen and (orientation:landscape); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:109:29 + | +109 | @import "test.css" supports(display: flex) screen and (orientation:landscape); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:109:29 | @@ -4858,6 +4888,12 @@ error: Declaration 110 | @import"test.css"supports(display: flex)screen and (orientation:landscape); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:110:27 + | +110 | @import"test.css"supports(display: flex)screen and (orientation:landscape); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:110:27 | @@ -5452,6 +5488,12 @@ error: Declaration 128 | @import url("./test.css") supports(display: flex); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:128:36 + | +128 | @import url("./test.css") supports(display: flex); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:128:36 | @@ -5530,6 +5572,12 @@ error: Declaration 129 | @import url("./test.css") supports(display: flex !important); | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:129:36 + | +129 | @import url("./test.css") supports(display: flex !important); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:129:36 | @@ -5608,6 +5656,12 @@ error: Declaration 130 | @import url("./test.css") supports(display: flex) screen and (min-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:130:36 + | +130 | @import url("./test.css") supports(display: flex) screen and (min-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:130:36 | @@ -5938,6 +5992,12 @@ error: Declaration 133 | @import url("./test.css") layer(default) supports(display: flex) screen and (min-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:133:51 + | +133 | @import url("./test.css") layer(default) supports(display: flex) screen and (min-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:133:51 | @@ -6112,6 +6172,12 @@ error: Declaration 134 | @import url("./test.css") layer supports(display: flex) screen and (min-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:134:42 + | +134 | @import url("./test.css") layer supports(display: flex) screen and (min-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:134:42 | @@ -6292,6 +6358,12 @@ error: Declaration 135 | @import url("./test.css") layer() supports(display: flex) screen and (min-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:135:44 + | +135 | @import url("./test.css") layer() supports(display: flex) screen and (min-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:135:44 | @@ -6520,6 +6592,12 @@ error: Declaration 137 | @import url("http://example.com/style.css") supports(display: flex) screen and (min-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:137:54 + | +137 | @import url("http://example.com/style.css") supports(display: flex) screen and (min-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:137:54 | @@ -6712,6 +6790,12 @@ error: Declaration 138 | @import url("./test.css")layer(default)supports(display: flex)screen and (min-width:400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:138:49 + | +138 | @import url("./test.css")layer(default)supports(display: flex)screen and (min-width:400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:138:49 | @@ -7036,6 +7120,12 @@ error: Declaration 142 | @import url("./test.css") /* Comment */ layer(/* Comment */default/* Comment */) /* Comment */ supports(/* Comment */display/* Comment */:/* Comment */ flex/* Comment */)/* Comment */ screen/* Comment */ and/* Comment */ (/* Comment */min-width/* Comment */: /* Comment */400px/* Comment */); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:142:118 + | +142 | @import url("./test.css") /* Comment */ layer(/* Comment */default/* Comment */) /* Comment */ supports(/* Comment */display/* Comment */:/* Comment */ flex/* Comment */)/* Comment */ screen/* Comment */ and/* Comment */ (/* Comment */min-width/* Comment */: /* Comment */400px/* Comment */); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:142:118 | @@ -7648,6 +7738,12 @@ error: Declaration 149 | @import url("./import-with-supports.css") supports(display: flex); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:149:52 + | +149 | @import url("./import-with-supports.css") supports(display: flex); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:149:52 | @@ -7768,6 +7864,12 @@ error: Declaration 150 | @import url("./import-with-supports.css") supports(((display: flex))); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:150:54 + | +150 | @import url("./import-with-supports.css") supports(((display: flex))); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:150:54 | @@ -7846,6 +7948,12 @@ error: Declaration 151 | @import url("./deep-import-with-supports.css") supports(display: flex); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:151:57 + | +151 | @import url("./deep-import-with-supports.css") supports(display: flex); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:151:57 | @@ -7924,6 +8032,12 @@ error: Declaration 152 | @import url('./test.css') supports(display: grid); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:152:36 + | +152 | @import url('./test.css') supports(display: grid); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:152:36 | @@ -8002,6 +8116,12 @@ error: Declaration 153 | @import url('./test.css') supports( display : grid ); | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:153:39 + | +153 | @import url('./test.css') supports( display : grid ); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:153:39 | @@ -8080,6 +8200,12 @@ error: Declaration 154 | @import url("./import-with-supports-and-media.css") supports(display: flex) screen and (min-width: 400px); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:154:62 + | +154 | @import url("./import-with-supports-and-media.css") supports(display: flex) screen and (min-width: 400px); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:154:62 | @@ -8506,6 +8632,12 @@ error: Declaration 158 | @import url("./import-with-layer-and-supports.css") layer(default) supports(display: flex); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/import/input.css:158:77 + | +158 | @import url("./import-with-layer-and-supports.css") layer(default) supports(display: flex); + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/import/input.css:158:77 | diff --git a/crates/swc_css_parser/tests/fixture/at-rule/keyframe/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/keyframe/span.rust-debug index 1458584a8b0..5f0a1d8ff3c 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/keyframe/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/at-rule/keyframe/span.rust-debug @@ -168,6 +168,12 @@ error: Declaration 7 | transform: translateX(0%); | ^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:7:9 + | +7 | transform: translateX(0%); + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:7:9 | @@ -254,6 +260,12 @@ error: Declaration 11 | transform: translateX(100%); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:11:9 + | +11 | transform: translateX(100%); + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:11:9 | @@ -377,6 +389,12 @@ error: Declaration 16 | 0% { top: 0; left: 0; } | ^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:16:10 + | +16 | 0% { top: 0; left: 0; } + | ^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:16:10 | @@ -401,6 +419,12 @@ error: Declaration 16 | 0% { top: 0; left: 0; } | ^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:16:18 + | +16 | 0% { top: 0; left: 0; } + | ^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:16:18 | @@ -461,6 +485,12 @@ error: Declaration 17 | 30% { top: 50px; } | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:17:11 + | +17 | 30% { top: 50px; } + | ^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:17:11 | @@ -551,6 +581,12 @@ error: Declaration 18 | 68%, 72% { left: 50px; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:18:16 + | +18 | 68%, 72% { left: 50px; } + | ^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:18:16 | @@ -623,6 +659,12 @@ error: Declaration 19 | 100% { top: 100px; left: 100%; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:19:12 + | +19 | 100% { top: 100px; left: 100%; } + | ^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:19:12 | @@ -659,6 +701,12 @@ error: Declaration 19 | 100% { top: 100px; left: 100%; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/keyframe/input.css:19:24 + | +19 | 100% { top: 100px; left: 100%; } + | ^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/keyframe/input.css:19:24 | diff --git a/crates/swc_css_parser/tests/fixture/at-rule/layer/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/layer/span.rust-debug index 6794372b43b..54da445fb6f 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/layer/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/at-rule/layer/span.rust-debug @@ -214,6 +214,12 @@ error: Declaration 5 | from { translate: 0; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:5:16 + | +5 | from { translate: 0; } + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:5:16 | @@ -268,6 +274,12 @@ error: Declaration 6 | to { translate: -100% 0; } | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:6:14 + | +6 | to { translate: -100% 0; } + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:6:14 | @@ -424,6 +436,12 @@ error: Declaration 12 | from { margin-left: 0; } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:12:16 + | +12 | from { margin-left: 0; } + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:12:16 | @@ -478,6 +496,12 @@ error: Declaration 13 | to { margin-left: -100%; } | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:13:14 + | +13 | to { margin-left: -100%; } + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:13:14 | @@ -562,6 +586,12 @@ error: Declaration 17 | .sidebar { animation: slide-left 300ms; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:17:12 + | +17 | .sidebar { animation: slide-left 300ms; } + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:17:12 | @@ -742,6 +772,12 @@ error: Declaration 23 | strong { font-weight: bold; } | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:23:14 + | +23 | strong { font-weight: bold; } + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:23:14 | @@ -874,6 +910,12 @@ error: Declaration 27 | .title { font-weight: 100; } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:27:14 + | +27 | .title { font-weight: 100; } + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:27:14 | @@ -1012,6 +1054,12 @@ error: Declaration 30 | h1, h2 { color: maroon; } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:30:18 + | +30 | h1, h2 { color: maroon; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:30:18 | @@ -1132,6 +1180,12 @@ error: Declaration 35 | [hidden] { display: none; } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:35:16 + | +35 | [hidden] { display: none; } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:35:16 | @@ -1300,6 +1354,12 @@ error: Declaration 40 | p { margin-block: 0.75em; } | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:40:13 + | +40 | p { margin-block: 0.75em; } + | ^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:40:13 | @@ -1426,6 +1486,12 @@ error: Declaration 44 | p { color: #222; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:44:13 + | +44 | p { color: #222; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:44:13 | @@ -1549,6 +1615,12 @@ error: Declaration 50 | blockquote { color: rebeccapurple; } | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/layer/input.css:50:18 + | +50 | blockquote { color: rebeccapurple; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/layer/input.css:50:18 | diff --git a/crates/swc_css_parser/tests/fixture/at-rule/page/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/page/span.rust-debug index 165987abb4a..300727fdd22 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/page/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/at-rule/page/span.rust-debug @@ -94,6 +94,12 @@ error: Declaration 3 | @page{margin: 1cm} | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/page/input.css:3:7 + | +3 | @page{margin: 1cm} + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/page/input.css:3:7 | @@ -160,6 +166,12 @@ error: Declaration 4 | @page {margin: 1cm} | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/page/input.css:4:8 + | +4 | @page {margin: 1cm} + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/page/input.css:4:8 | @@ -226,6 +238,12 @@ error: Declaration 5 | @page {margin: 1cm;} | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/page/input.css:5:8 + | +5 | @page {margin: 1cm;} + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/page/input.css:5:8 | @@ -304,6 +322,12 @@ error: Declaration 6 | @page :first {margin: 2cm} | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/page/input.css:6:15 + | +6 | @page :first {margin: 2cm} + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/page/input.css:6:15 | @@ -382,6 +406,12 @@ error: Declaration 7 | @page :first {margin: 2cm;} | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/page/input.css:7:15 + | +7 | @page :first {margin: 2cm;} + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/page/input.css:7:15 | @@ -460,6 +490,12 @@ error: Declaration 8 | @page :first{margin: 2cm;} | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/page/input.css:8:14 + | +8 | @page :first{margin: 2cm;} + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/page/input.css:8:14 | diff --git a/crates/swc_css_parser/tests/fixture/at-rule/supports/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/supports/span.rust-debug index 368ed0ad519..c076bedb627 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/supports/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/at-rule/supports/span.rust-debug @@ -70,6 +70,12 @@ error: Declaration 1 | @supports (display: grid) { | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:1:12 + | +1 | @supports (display: grid) { + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:1:12 | @@ -149,6 +155,12 @@ error: Declaration 3 | display: grid; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:3:9 + | +3 | display: grid; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:3:9 | @@ -233,6 +245,12 @@ error: Declaration 7 | @supports (display: flex) { | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:7:12 + | +7 | @supports (display: flex) { + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:7:12 | @@ -312,6 +330,12 @@ error: Declaration 9 | color: blue; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:9:9 + | +9 | color: blue; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:9:9 | @@ -505,6 +529,12 @@ error: Declaration 14 | display: flex; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:14:13 + | +14 | display: flex; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:14:13 | @@ -571,6 +601,12 @@ error: Declaration 18 | @supports ( display : flex ) {} | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:18:17 + | +18 | @supports ( display : flex ) {} + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:18:17 | @@ -643,6 +679,12 @@ error: Declaration 19 | @supports not (display: flex) {} | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:19:16 + | +19 | @supports not (display: flex) {} + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:19:16 | @@ -715,6 +757,12 @@ error: Declaration 20 | @SUPPORTS not (display: flex) {} | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:20:16 + | +20 | @SUPPORTS not (display: flex) {} + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:20:16 | @@ -781,6 +829,12 @@ error: Declaration 21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:21:12 + | +21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:21:12 | @@ -889,6 +943,12 @@ error: Declaration 21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:21:50 + | +21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} + | ^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:21:50 | @@ -997,6 +1057,12 @@ error: Declaration 21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:21:93 + | +21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} + | ^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:21:93 | @@ -1105,6 +1171,12 @@ error: Declaration 21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:21:139 + | +21 | @supports (box-shadow: 0 0 2px black inset ) or (-moz-box-shadow: 0 0 2px black inset ) or (-webkit-box-shadow: 0 0 2px black inset ) or (-o-box-shadow: 0 0 2px black inset ) {} + | ^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:21:139 | @@ -1250,6 +1322,12 @@ error: Declaration 22 | @supports ( box-shadow: 0 0 2px black inset ) or | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:22:13 + | +22 | @supports ( box-shadow: 0 0 2px black inset ) or + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:22:13 | @@ -1362,6 +1440,12 @@ error: Declaration 23 | ( -moz-box-shadow: 0 0 2px black inset ) or | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:23:5 + | +23 | ( -moz-box-shadow: 0 0 2px black inset ) or + | ^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:23:5 | @@ -1474,6 +1558,12 @@ error: Declaration 24 | ( -webkit-box-shadow: 0 0 2px black inset ) or | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:24:5 + | +24 | ( -webkit-box-shadow: 0 0 2px black inset ) or + | ^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:24:5 | @@ -1586,6 +1676,12 @@ error: Declaration 25 | ( -o-box-shadow: 0 0 2px black inset ) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:25:5 + | +25 | ( -o-box-shadow: 0 0 2px black inset ) { + | ^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:25:5 | @@ -1730,6 +1826,12 @@ error: Declaration 28 | @supports ((transition-property: color) or (animation-name: foo)) and (transform: rotate(10deg)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:28:13 + | +28 | @supports ((transition-property: color) or (animation-name: foo)) and (transform: rotate(10deg)) {} + | ^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:28:13 | @@ -1778,6 +1880,12 @@ error: Declaration 28 | @supports ((transition-property: color) or (animation-name: foo)) and (transform: rotate(10deg)) {} | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:28:45 + | +28 | @supports ((transition-property: color) or (animation-name: foo)) and (transform: rotate(10deg)) {} + | ^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:28:45 | @@ -1826,6 +1934,12 @@ error: Declaration 28 | @supports ((transition-property: color) or (animation-name: foo)) and (transform: rotate(10deg)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:28:72 + | +28 | @supports ((transition-property: color) or (animation-name: foo)) and (transform: rotate(10deg)) {} + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:28:72 | @@ -1922,6 +2036,12 @@ error: Declaration 29 | @supports (transition-property: color) or ((animation-name: foo) and (transform: rotate(10deg))) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:29:12 + | +29 | @supports (transition-property: color) or ((animation-name: foo) and (transform: rotate(10deg))) {} + | ^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:29:12 | @@ -1988,6 +2108,12 @@ error: Declaration 29 | @supports (transition-property: color) or ((animation-name: foo) and (transform: rotate(10deg))) {} | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:29:45 + | +29 | @supports (transition-property: color) or ((animation-name: foo) and (transform: rotate(10deg))) {} + | ^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:29:45 | @@ -2036,6 +2162,12 @@ error: Declaration 29 | @supports (transition-property: color) or ((animation-name: foo) and (transform: rotate(10deg))) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:29:71 + | +29 | @supports (transition-property: color) or ((animation-name: foo) and (transform: rotate(10deg))) {} + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:29:71 | @@ -2132,6 +2264,12 @@ error: Declaration 30 | @supports ( transition-property : color ) or ( ( animation-name : foo ) and ( transform : rotate(10deg) ) ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:30:17 + | +30 | @supports ( transition-property : color ) or ( ( animation-name : foo ) and ( transform : rotate(10deg) ) ) {} + | ^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:30:17 | @@ -2198,6 +2336,12 @@ error: Declaration 30 | @supports ( transition-property : color ) or ( ( animation-name : foo ) and ( transform : rotate(10deg) ) ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:30:68 + | +30 | @supports ( transition-property : color ) or ( ( animation-name : foo ) and ( transform : rotate(10deg) ) ) {} + | ^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:30:68 | @@ -2246,6 +2390,12 @@ error: Declaration 30 | @supports ( transition-property : color ) or ( ( animation-name : foo ) and ( transform : rotate(10deg) ) ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:30:109 + | +30 | @supports ( transition-property : color ) or ( ( animation-name : foo ) and ( transform : rotate(10deg) ) ) {} + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:30:109 | @@ -2342,6 +2492,12 @@ error: Declaration 31 | @supports(transition-property:color)or ((animation-name:foo)and (transform:rotate(10deg))){} | ^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:31:11 + | +31 | @supports(transition-property:color)or ((animation-name:foo)and (transform:rotate(10deg))){} + | ^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:31:11 | @@ -2408,6 +2564,12 @@ error: Declaration 31 | @supports(transition-property:color)or ((animation-name:foo)and (transform:rotate(10deg))){} | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:31:42 + | +31 | @supports(transition-property:color)or ((animation-name:foo)and (transform:rotate(10deg))){} + | ^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:31:42 | @@ -2456,6 +2618,12 @@ error: Declaration 31 | @supports(transition-property:color)or ((animation-name:foo)and (transform:rotate(10deg))){} | ^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:31:66 + | +31 | @supports(transition-property:color)or ((animation-name:foo)and (transform:rotate(10deg))){} + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:31:66 | @@ -2570,6 +2738,12 @@ error: Declaration 32 | @supports ((display: flex)) {} | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:32:13 + | +32 | @supports ((display: flex)) {} + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:32:13 | @@ -2636,6 +2810,12 @@ error: Declaration 33 | @supports (display: flex !important) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/at-rule/supports/input.css:33:12 + | +33 | @supports (display: flex !important) {} + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/at-rule/supports/input.css:33:12 | diff --git a/crates/swc_css_parser/tests/fixture/at-rule/unknown/output.json b/crates/swc_css_parser/tests/fixture/at-rule/unknown/output.json index d5c6e59872f..fdc20885aed 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/unknown/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/unknown/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 8, "ctxt": 0 }, @@ -36,7 +36,7 @@ "name": { "type": "Identifier", "span": { - "start": 10, + "start": 11, "end": 18, "ctxt": 0 }, @@ -147,7 +147,7 @@ "name": { "type": "Identifier", "span": { - "start": 24, + "start": 25, "end": 32, "ctxt": 0 }, @@ -213,7 +213,7 @@ "name": { "type": "Identifier", "span": { - "start": 41, + "start": 42, "end": 49, "ctxt": 0 }, @@ -279,7 +279,7 @@ "name": { "type": "Identifier", "span": { - "start": 115, + "start": 116, "end": 123, "ctxt": 0 }, @@ -322,7 +322,7 @@ "name": { "type": "Identifier", "span": { - "start": 127, + "start": 128, "end": 135, "ctxt": 0 }, @@ -433,7 +433,7 @@ "name": { "type": "Identifier", "span": { - "start": 144, + "start": 145, "end": 152, "ctxt": 0 }, @@ -485,7 +485,7 @@ "name": { "type": "Identifier", "span": { - "start": 156, + "start": 157, "end": 165, "ctxt": 0 }, @@ -537,7 +537,7 @@ "name": { "type": "Identifier", "span": { - "start": 169, + "start": 170, "end": 177, "ctxt": 0 }, @@ -679,7 +679,7 @@ "name": { "type": "Identifier", "span": { - "start": 185, + "start": 186, "end": 193, "ctxt": 0 }, @@ -796,7 +796,7 @@ "name": { "type": "Identifier", "span": { - "start": 200, + "start": 201, "end": 208, "ctxt": 0 }, @@ -1003,7 +1003,7 @@ "name": { "type": "Identifier", "span": { - "start": 279, + "start": 280, "end": 287, "ctxt": 0 }, @@ -1097,7 +1097,7 @@ "name": { "type": "Identifier", "span": { - "start": 542, + "start": 543, "end": 550, "ctxt": 0 }, @@ -1302,7 +1302,7 @@ "name": { "type": "Identifier", "span": { - "start": 566, + "start": 567, "end": 574, "ctxt": 0 }, @@ -1597,7 +1597,7 @@ "name": { "type": "Identifier", "span": { - "start": 650, + "start": 651, "end": 658, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/at-rule/unknown/span.rust-debug b/crates/swc_css_parser/tests/fixture/at-rule/unknown/span.rust-debug index e6144f4a833..ef212de33bb 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/unknown/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/at-rule/unknown/span.rust-debug @@ -28,11 +28,17 @@ error: UnknownAtRule 1 | @unknown; | ^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:1:2 | 1 | @unknown; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:1:2 + | +1 | @unknown; + | ^^^^^^^ error: Rule --> $DIR/tests/fixture/at-rule/unknown/input.css:2:1 @@ -52,11 +58,17 @@ error: UnknownAtRule 2 | @unknown x y; | ^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:2:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:2:2 | 2 | @unknown x y; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:2:2 + | +2 | @unknown x y; + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:2:9 @@ -148,11 +160,17 @@ error: UnknownAtRule 3 | @unknown "blah"; | ^^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:3:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:3:2 | 3 | @unknown "blah"; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:3:2 + | +3 | @unknown "blah"; + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:3:9 @@ -208,11 +226,17 @@ error: UnknownAtRule 4 | @unknown \"blah\"; | ^^^^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:4:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:4:2 | 4 | @unknown \"blah\"; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:4:2 + | +4 | @unknown \"blah\"; + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:4:9 @@ -268,11 +292,17 @@ error: UnknownAtRule 7 | @unknown ; | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:7:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:7:2 | 7 | @unknown ; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:7:2 + | +7 | @unknown ; + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:7:9 @@ -310,11 +340,17 @@ error: UnknownAtRule 8 | @unknown x y; | ^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:8:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:8:2 | 8 | @unknown x y; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:8:2 + | +8 | @unknown x y; + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:8:9 @@ -406,11 +442,17 @@ error: UnknownAtRule 10 | @unknown {} | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:10:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:10:2 | 10 | @unknown {} - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:10:2 + | +10 | @unknown {} + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:10:9 @@ -454,11 +496,17 @@ error: UnknownAtRule 11 | @\unknown {} | ^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:11:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:11:2 | 11 | @\unknown {} - | ^^^^^^^^^ + | ^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:11:2 + | +11 | @\unknown {} + | ^^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:11:10 @@ -502,11 +550,17 @@ error: UnknownAtRule 12 | @unknown a b {} | ^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:12:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:12:2 | 12 | @unknown a b {} - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:12:2 + | +12 | @unknown a b {} + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:12:9 @@ -622,11 +676,17 @@ error: UnknownAtRule 13 | @unknown {p:v} | ^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:13:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:13:2 | 13 | @unknown {p:v} - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:13:2 + | +13 | @unknown {p:v} + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:13:9 @@ -724,11 +784,17 @@ error: UnknownAtRule 14 | @unknown x y {p:v} | ^^^^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:14:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:14:2 | 14 | @unknown x y {p:v} - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:14:2 + | +14 | @unknown x y {p:v} + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:14:9 @@ -898,11 +964,17 @@ error: UnknownAtRule 17 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:17:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:17:2 | 17 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/} - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:17:2 + | +17 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/} + | ^^^^^^^ error: SimpleBlock --> $DIR/tests/fixture/at-rule/unknown/input.css:17:17 @@ -982,11 +1054,17 @@ error: UnknownAtRule 20 | @unknown { p : v } | ^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:20:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:20:2 | 20 | @unknown { p : v } - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:20:2 + | +20 | @unknown { p : v } + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:20:9 @@ -1156,11 +1234,17 @@ error: UnknownAtRule 21 | @unknown x y { p : v } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:21:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:21:2 | 21 | @unknown x y { p : v } - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:21:2 + | +21 | @unknown x y { p : v } + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:21:9 @@ -1402,11 +1486,17 @@ error: UnknownAtRule 24 | @unknown {s{p:v}} | ^^^^^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/at-rule/unknown/input.css:24:1 +error: AtRuleName + --> $DIR/tests/fixture/at-rule/unknown/input.css:24:2 | 24 | @unknown {s{p:v}} - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/at-rule/unknown/input.css:24:2 + | +24 | @unknown {s{p:v}} + | ^^^^^^^ error: Value --> $DIR/tests/fixture/at-rule/unknown/input.css:24:9 diff --git a/crates/swc_css_parser/tests/fixture/bom/span.rust-debug b/crates/swc_css_parser/tests/fixture/bom/span.rust-debug index 3317e863056..88144d466a5 100644 --- a/crates/swc_css_parser/tests/fixture/bom/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/bom/span.rust-debug @@ -67,6 +67,12 @@ error: Declaration 2 | color: red; | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/bom/input.css:2:5 + | +2 | color: red; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/bom/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/comment/span.rust-debug b/crates/swc_css_parser/tests/fixture/comment/span.rust-debug index 9e2bf670615..e774191078e 100644 --- a/crates/swc_css_parser/tests/fixture/comment/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/comment/span.rust-debug @@ -75,6 +75,12 @@ error: Declaration 3 | /* comment */color/* comment */:/* comment */red/* comment */; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/comment/input.css:3:14 + | +3 | /* comment */color/* comment */:/* comment */red/* comment */; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/comment/input.css:3:14 | @@ -166,6 +172,12 @@ error: Declaration 11 | color: black; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/comment/input.css:11:5 + | +11 | color: black; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/comment/input.css:11:5 | @@ -190,6 +202,12 @@ error: Declaration 13 | background: red; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/comment/input.css:13:5 + | +13 | background: red; + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/comment/input.css:13:5 | @@ -272,6 +290,12 @@ error: Declaration 19 | color: black; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/comment/input.css:19:5 + | +19 | color: black; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/comment/input.css:19:5 | diff --git a/crates/swc_css_parser/tests/fixture/dashed-ident/input.css b/crates/swc_css_parser/tests/fixture/dashed-ident/input.css new file mode 100644 index 00000000000..92fc81675e1 --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/dashed-ident/input.css @@ -0,0 +1,15 @@ +:root { + --main-color: #06c; + --accent-color: #006; +} + +.foo { + --fg-color: blue; +} + +#foo h1 { + color: var(--main-color); +} + +@--custom {} +@--library1-custom {} diff --git a/crates/swc_css_parser/tests/fixture/dashed-ident/output.json b/crates/swc_css_parser/tests/fixture/dashed-ident/output.json new file mode 100644 index 00000000000..f467dafc86e --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/dashed-ident/output.json @@ -0,0 +1,578 @@ +{ + "type": "Stylesheet", + "span": { + "start": 0, + "end": 171, + "ctxt": 0 + }, + "rules": [ + { + "type": "QualifiedRule", + "span": { + "start": 0, + "end": 59, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 0, + "end": 5, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 0, + "end": 5, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 0, + "end": 5, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 0, + "end": 5, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1, + "end": 5, + "ctxt": 0 + }, + "value": "root", + "raw": "root" + }, + "children": null + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 6, + "end": 59, + "ctxt": 0 + }, + "value": [ + { + "type": "Declaration", + "span": { + "start": 12, + "end": 26, + "ctxt": 0 + }, + "property": { + "type": "DashedIdentifier", + "span": { + "start": 12, + "end": 24, + "ctxt": 0 + }, + "value": "--main-color", + "raw": "--main-color" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 25, + "end": 30, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 25, + "end": 26, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 26, + "end": 30, + "ctxt": 0 + }, + "token": { + "Hash": { + "is_id": false, + "value": "06c", + "raw": "06c" + } + } + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 36, + "end": 52, + "ctxt": 0 + }, + "property": { + "type": "DashedIdentifier", + "span": { + "start": 36, + "end": 50, + "ctxt": 0 + }, + "value": "--accent-color", + "raw": "--accent-color" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 51, + "end": 56, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 51, + "end": 52, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 52, + "end": 56, + "ctxt": 0 + }, + "token": { + "Hash": { + "is_id": false, + "value": "006", + "raw": "006" + } + } + } + ] + } + ], + "important": null + } + ] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 61, + "end": 91, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 61, + "end": 65, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 61, + "end": 65, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 61, + "end": 65, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "ClassSelector", + "span": { + "start": 61, + "end": 65, + "ctxt": 0 + }, + "text": { + "type": "Identifier", + "span": { + "start": 62, + "end": 65, + "ctxt": 0 + }, + "value": "foo", + "raw": "foo" + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 66, + "end": 91, + "ctxt": 0 + }, + "value": [ + { + "type": "Declaration", + "span": { + "start": 72, + "end": 84, + "ctxt": 0 + }, + "property": { + "type": "DashedIdentifier", + "span": { + "start": 72, + "end": 82, + "ctxt": 0 + }, + "value": "--fg-color", + "raw": "--fg-color" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 83, + "end": 88, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 83, + "end": 84, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 84, + "end": 88, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "blue", + "raw": "blue" + } + } + } + ] + } + ], + "important": null + } + ] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 93, + "end": 134, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 93, + "end": 100, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 93, + "end": 100, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 93, + "end": 97, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "IdSelector", + "span": { + "start": 93, + "end": 97, + "ctxt": 0 + }, + "text": { + "type": "Identifier", + "span": { + "start": 93, + "end": 97, + "ctxt": 0 + }, + "value": "foo", + "raw": "foo" + } + } + ] + }, + { + "type": "Combinator", + "span": { + "start": 97, + "end": 98, + "ctxt": 0 + }, + "value": " " + }, + { + "type": "CompoundSelector", + "span": { + "start": 98, + "end": 100, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": { + "type": "TypeSelector", + "span": { + "start": 98, + "end": 100, + "ctxt": 0 + }, + "prefix": null, + "name": { + "type": "Identifier", + "span": { + "start": 98, + "end": 100, + "ctxt": 0 + }, + "value": "h1", + "raw": "h1" + } + }, + "subclassSelectors": [] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 101, + "end": 134, + "ctxt": 0 + }, + "value": [ + { + "type": "Declaration", + "span": { + "start": 107, + "end": 131, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 107, + "end": 112, + "ctxt": 0 + }, + "value": "color", + "raw": "color" + }, + "value": [ + { + "type": "Function", + "span": { + "start": 114, + "end": 131, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 114, + "end": 117, + "ctxt": 0 + }, + "value": "var", + "raw": "var" + }, + "value": [ + { + "type": "DashedIdentifier", + "span": { + "start": 118, + "end": 130, + "ctxt": 0 + }, + "value": "--main-color", + "raw": "--main-color" + } + ] + } + ], + "important": null + } + ] + } + }, + { + "type": "UnknownAtRule", + "span": { + "start": 136, + "end": 148, + "ctxt": 0 + }, + "name": { + "type": "DashedIdentifier", + "span": { + "start": 137, + "end": 145, + "ctxt": 0 + }, + "value": "--custom", + "raw": "--custom" + }, + "prelude": [ + { + "type": "Tokens", + "span": { + "start": 145, + "end": 146, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 145, + "end": 146, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + } + ] + } + ], + "block": { + "type": "SimpleBlock", + "span": { + "start": 146, + "end": 148, + "ctxt": 0 + }, + "name": "{", + "value": [] + } + }, + { + "type": "UnknownAtRule", + "span": { + "start": 149, + "end": 170, + "ctxt": 0 + }, + "name": { + "type": "DashedIdentifier", + "span": { + "start": 150, + "end": 167, + "ctxt": 0 + }, + "value": "--library1-custom", + "raw": "--library1-custom" + }, + "prelude": [ + { + "type": "Tokens", + "span": { + "start": 167, + "end": 168, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 167, + "end": 168, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + } + ] + } + ], + "block": { + "type": "SimpleBlock", + "span": { + "start": 168, + "end": 170, + "ctxt": 0 + }, + "name": "{", + "value": [] + } + } + ] +} diff --git a/crates/swc_css_parser/tests/fixture/dashed-ident/span.rust-debug b/crates/swc_css_parser/tests/fixture/dashed-ident/span.rust-debug new file mode 100644 index 00000000000..0819343f223 --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/dashed-ident/span.rust-debug @@ -0,0 +1,504 @@ +error: Stylesheet + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | / :root { +2 | | --main-color: #06c; +3 | | --accent-color: #006; +4 | | } +... | +14 | | @--custom {} +15 | | @--library1-custom {} + | |______________________^ + +error: Rule + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | / :root { +2 | | --main-color: #06c; +3 | | --accent-color: #006; +4 | | } + | |_^ + +error: QualifiedRule + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | / :root { +2 | | --main-color: #06c; +3 | | --accent-color: #006; +4 | | } + | |_^ + +error: SelectorList + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | :root { + | ^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | :root { + | ^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | :root { + | ^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | :root { + | ^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/dashed-ident/input.css:1:1 + | +1 | :root { + | ^^^^^ + +error: Ident + --> $DIR/tests/fixture/dashed-ident/input.css:1:2 + | +1 | :root { + | ^^^^ + +error: Block + --> $DIR/tests/fixture/dashed-ident/input.css:1:7 + | +1 | :root { + | _______^ +2 | | --main-color: #06c; +3 | | --accent-color: #006; +4 | | } + | |_^ + +error: Declaration + --> $DIR/tests/fixture/dashed-ident/input.css:2:5 + | +2 | --main-color: #06c; + | ^^^^^^^^^^^^^^ + +error: DeclarationProperty + --> $DIR/tests/fixture/dashed-ident/input.css:2:5 + | +2 | --main-color: #06c; + | ^^^^^^^^^^^^ + +error: DashedIdent + --> $DIR/tests/fixture/dashed-ident/input.css:2:5 + | +2 | --main-color: #06c; + | ^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/dashed-ident/input.css:2:18 + | +2 | --main-color: #06c; + | ^^^^^ + +error: Tokens + --> $DIR/tests/fixture/dashed-ident/input.css:2:18 + | +2 | --main-color: #06c; + | ^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:2:18 + | +2 | --main-color: #06c; + | ^ + +error: Hash { is_id: false, value: Atom('06c' type=inline), raw: Atom('06c' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:2:19 + | +2 | --main-color: #06c; + | ^^^^ + +error: Declaration + --> $DIR/tests/fixture/dashed-ident/input.css:3:5 + | +3 | --accent-color: #006; + | ^^^^^^^^^^^^^^^^ + +error: DeclarationProperty + --> $DIR/tests/fixture/dashed-ident/input.css:3:5 + | +3 | --accent-color: #006; + | ^^^^^^^^^^^^^^ + +error: DashedIdent + --> $DIR/tests/fixture/dashed-ident/input.css:3:5 + | +3 | --accent-color: #006; + | ^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/dashed-ident/input.css:3:20 + | +3 | --accent-color: #006; + | ^^^^^ + +error: Tokens + --> $DIR/tests/fixture/dashed-ident/input.css:3:20 + | +3 | --accent-color: #006; + | ^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:3:20 + | +3 | --accent-color: #006; + | ^ + +error: Hash { is_id: false, value: Atom('006' type=inline), raw: Atom('006' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:3:21 + | +3 | --accent-color: #006; + | ^^^^ + +error: Rule + --> $DIR/tests/fixture/dashed-ident/input.css:6:1 + | +6 | / .foo { +7 | | --fg-color: blue; +8 | | } + | |_^ + +error: QualifiedRule + --> $DIR/tests/fixture/dashed-ident/input.css:6:1 + | +6 | / .foo { +7 | | --fg-color: blue; +8 | | } + | |_^ + +error: SelectorList + --> $DIR/tests/fixture/dashed-ident/input.css:6:1 + | +6 | .foo { + | ^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/dashed-ident/input.css:6:1 + | +6 | .foo { + | ^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/dashed-ident/input.css:6:1 + | +6 | .foo { + | ^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/dashed-ident/input.css:6:1 + | +6 | .foo { + | ^^^^ + +error: ClassSelector + --> $DIR/tests/fixture/dashed-ident/input.css:6:1 + | +6 | .foo { + | ^^^^ + +error: Ident + --> $DIR/tests/fixture/dashed-ident/input.css:6:2 + | +6 | .foo { + | ^^^ + +error: Block + --> $DIR/tests/fixture/dashed-ident/input.css:6:6 + | +6 | .foo { + | ______^ +7 | | --fg-color: blue; +8 | | } + | |_^ + +error: Declaration + --> $DIR/tests/fixture/dashed-ident/input.css:7:5 + | +7 | --fg-color: blue; + | ^^^^^^^^^^^^ + +error: DeclarationProperty + --> $DIR/tests/fixture/dashed-ident/input.css:7:5 + | +7 | --fg-color: blue; + | ^^^^^^^^^^ + +error: DashedIdent + --> $DIR/tests/fixture/dashed-ident/input.css:7:5 + | +7 | --fg-color: blue; + | ^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/dashed-ident/input.css:7:16 + | +7 | --fg-color: blue; + | ^^^^^ + +error: Tokens + --> $DIR/tests/fixture/dashed-ident/input.css:7:16 + | +7 | --fg-color: blue; + | ^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:7:16 + | +7 | --fg-color: blue; + | ^ + +error: Ident { value: Atom('blue' type=inline), raw: Atom('blue' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:7:17 + | +7 | --fg-color: blue; + | ^^^^ + +error: Rule + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | / #foo h1 { +11 | | color: var(--main-color); +12 | | } + | |_^ + +error: QualifiedRule + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | / #foo h1 { +11 | | color: var(--main-color); +12 | | } + | |_^ + +error: SelectorList + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | #foo h1 { + | ^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | #foo h1 { + | ^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | #foo h1 { + | ^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | #foo h1 { + | ^^^^ + +error: IdSelector + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | #foo h1 { + | ^^^^ + +error: Ident + --> $DIR/tests/fixture/dashed-ident/input.css:10:1 + | +10 | #foo h1 { + | ^^^^ + +error: Combinator + --> $DIR/tests/fixture/dashed-ident/input.css:10:5 + | +10 | #foo h1 { + | ^ + +error: CompoundSelector + --> $DIR/tests/fixture/dashed-ident/input.css:10:6 + | +10 | #foo h1 { + | ^^ + +error: TypeSelector + --> $DIR/tests/fixture/dashed-ident/input.css:10:6 + | +10 | #foo h1 { + | ^^ + +error: Ident + --> $DIR/tests/fixture/dashed-ident/input.css:10:6 + | +10 | #foo h1 { + | ^^ + +error: Block + --> $DIR/tests/fixture/dashed-ident/input.css:10:9 + | +10 | #foo h1 { + | _________^ +11 | | color: var(--main-color); +12 | | } + | |_^ + +error: Declaration + --> $DIR/tests/fixture/dashed-ident/input.css:11:5 + | +11 | color: var(--main-color); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: DeclarationProperty + --> $DIR/tests/fixture/dashed-ident/input.css:11:5 + | +11 | color: var(--main-color); + | ^^^^^ + +error: Ident + --> $DIR/tests/fixture/dashed-ident/input.css:11:5 + | +11 | color: var(--main-color); + | ^^^^^ + +error: Value + --> $DIR/tests/fixture/dashed-ident/input.css:11:12 + | +11 | color: var(--main-color); + | ^^^^^^^^^^^^^^^^^ + +error: Function + --> $DIR/tests/fixture/dashed-ident/input.css:11:12 + | +11 | color: var(--main-color); + | ^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/dashed-ident/input.css:11:12 + | +11 | color: var(--main-color); + | ^^^ + +error: Value + --> $DIR/tests/fixture/dashed-ident/input.css:11:16 + | +11 | color: var(--main-color); + | ^^^^^^^^^^^^ + +error: DashedIdent + --> $DIR/tests/fixture/dashed-ident/input.css:11:16 + | +11 | color: var(--main-color); + | ^^^^^^^^^^^^ + +error: Rule + --> $DIR/tests/fixture/dashed-ident/input.css:14:1 + | +14 | @--custom {} + | ^^^^^^^^^^^^ + +error: AtRule + --> $DIR/tests/fixture/dashed-ident/input.css:14:1 + | +14 | @--custom {} + | ^^^^^^^^^^^^ + +error: UnknownAtRule + --> $DIR/tests/fixture/dashed-ident/input.css:14:1 + | +14 | @--custom {} + | ^^^^^^^^^^^^ + +error: AtRuleName + --> $DIR/tests/fixture/dashed-ident/input.css:14:2 + | +14 | @--custom {} + | ^^^^^^^^ + +error: DashedIdent + --> $DIR/tests/fixture/dashed-ident/input.css:14:2 + | +14 | @--custom {} + | ^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/dashed-ident/input.css:14:10 + | +14 | @--custom {} + | ^ + +error: Tokens + --> $DIR/tests/fixture/dashed-ident/input.css:14:10 + | +14 | @--custom {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:14:10 + | +14 | @--custom {} + | ^ + +error: SimpleBlock + --> $DIR/tests/fixture/dashed-ident/input.css:14:11 + | +14 | @--custom {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/dashed-ident/input.css:15:1 + | +15 | @--library1-custom {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: AtRule + --> $DIR/tests/fixture/dashed-ident/input.css:15:1 + | +15 | @--library1-custom {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: UnknownAtRule + --> $DIR/tests/fixture/dashed-ident/input.css:15:1 + | +15 | @--library1-custom {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: AtRuleName + --> $DIR/tests/fixture/dashed-ident/input.css:15:2 + | +15 | @--library1-custom {} + | ^^^^^^^^^^^^^^^^^ + +error: DashedIdent + --> $DIR/tests/fixture/dashed-ident/input.css:15:2 + | +15 | @--library1-custom {} + | ^^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/dashed-ident/input.css:15:19 + | +15 | @--library1-custom {} + | ^ + +error: Tokens + --> $DIR/tests/fixture/dashed-ident/input.css:15:19 + | +15 | @--library1-custom {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/dashed-ident/input.css:15:19 + | +15 | @--library1-custom {} + | ^ + +error: SimpleBlock + --> $DIR/tests/fixture/dashed-ident/input.css:15:20 + | +15 | @--library1-custom {} + | ^^ + diff --git a/crates/swc_css_parser/tests/fixture/declaration-list/span.rust-debug b/crates/swc_css_parser/tests/fixture/declaration-list/span.rust-debug index e06bfa19f7b..82b077f955c 100644 --- a/crates/swc_css_parser/tests/fixture/declaration-list/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/declaration-list/span.rust-debug @@ -71,6 +71,12 @@ error: Declaration 2 | prop1: value; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/declaration-list/input.css:2:5 + | +2 | prop1: value; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/declaration-list/input.css:2:5 | @@ -95,6 +101,12 @@ error: Declaration 3 | prop2: value; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/declaration-list/input.css:3:5 + | +3 | prop2: value; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/declaration-list/input.css:3:5 | diff --git a/crates/swc_css_parser/tests/fixture/declaration/span.rust-debug b/crates/swc_css_parser/tests/fixture/declaration/span.rust-debug index 9adac6690f5..697edc56167 100644 --- a/crates/swc_css_parser/tests/fixture/declaration/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/declaration/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | prop: value; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/declaration/input.css:2:5 + | +2 | prop: value; + | ^^^^ + error: Ident --> $DIR/tests/fixture/declaration/input.css:2:5 | @@ -107,6 +113,12 @@ error: Declaration 3 | prop: (value); | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/declaration/input.css:3:5 + | +3 | prop: (value); + | ^^^^ + error: Ident --> $DIR/tests/fixture/declaration/input.css:3:5 | @@ -143,6 +155,12 @@ error: Declaration 4 | prop: {value}; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/declaration/input.css:4:5 + | +4 | prop: {value}; + | ^^^^ + error: Ident --> $DIR/tests/fixture/declaration/input.css:4:5 | @@ -185,6 +203,12 @@ error: Declaration 5 | prop: [value]; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/declaration/input.css:5:5 + | +5 | prop: [value]; + | ^^^^ + error: Ident --> $DIR/tests/fixture/declaration/input.css:5:5 | @@ -221,6 +245,12 @@ error: Declaration 6 | prop: fn(value); | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/declaration/input.css:6:5 + | +6 | prop: fn(value); + | ^^^^ + error: Ident --> $DIR/tests/fixture/declaration/input.css:6:5 | diff --git a/crates/swc_css_parser/tests/fixture/delim/backslash/span.rust-debug b/crates/swc_css_parser/tests/fixture/delim/backslash/span.rust-debug index 189fecb1341..441279b2ed8 100644 --- a/crates/swc_css_parser/tests/fixture/delim/backslash/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/delim/backslash/span.rust-debug @@ -67,6 +67,12 @@ error: Declaration 2 | color: \\ red \\ blue; | ^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/delim/backslash/input.css:2:5 + | +2 | color: \\ red \\ blue; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/delim/backslash/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/dimension/basic/span.rust-debug b/crates/swc_css_parser/tests/fixture/dimension/basic/span.rust-debug index 7cbbbfe60eb..36dc8e9ed29 100644 --- a/crates/swc_css_parser/tests/fixture/dimension/basic/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/dimension/basic/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | prop: 10px; | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/dimension/basic/input.css:2:5 + | +2 | prop: 10px; + | ^^^^ + error: Ident --> $DIR/tests/fixture/dimension/basic/input.css:2:5 | @@ -119,6 +125,12 @@ error: Declaration 3 | prop: .10px; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/dimension/basic/input.css:3:5 + | +3 | prop: .10px; + | ^^^^ + error: Ident --> $DIR/tests/fixture/dimension/basic/input.css:3:5 | @@ -155,6 +167,12 @@ error: Declaration 4 | prop: 12.34px; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/dimension/basic/input.css:4:5 + | +4 | prop: 12.34px; + | ^^^^ + error: Ident --> $DIR/tests/fixture/dimension/basic/input.css:4:5 | @@ -191,6 +209,12 @@ error: Declaration 5 | prop: 0000.000px; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/dimension/basic/input.css:5:5 + | +5 | prop: 0000.000px; + | ^^^^ + error: Ident --> $DIR/tests/fixture/dimension/basic/input.css:5:5 | @@ -227,6 +251,12 @@ error: Declaration 6 | prop: 1px\\9; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/dimension/basic/input.css:6:5 + | +6 | prop: 1px\\9; + | ^^^^ + error: Ident --> $DIR/tests/fixture/dimension/basic/input.css:6:5 | @@ -263,6 +293,12 @@ error: Declaration 7 | prop: 1e; | ^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/dimension/basic/input.css:7:5 + | +7 | prop: 1e; + | ^^^^ + error: Ident --> $DIR/tests/fixture/dimension/basic/input.css:7:5 | @@ -299,6 +335,12 @@ error: Declaration 8 | prop: 1unknown; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/dimension/basic/input.css:8:5 + | +8 | prop: 1unknown; + | ^^^^ + error: Ident --> $DIR/tests/fixture/dimension/basic/input.css:8:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/span.rust-debug index 799fdce784b..868a63479b3 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #112333 } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/input.css:1:5 + | +1 | a { color: #112333 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/span.rust-debug index b45fafdfd94..deb9b05594a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/span.rust-debug @@ -148,6 +148,12 @@ error: Declaration 1 | div::before::after::selection::first-line::first-letter {color:red} | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/input.css:1:58 + | +1 | div::before::after::selection::first-line::first-letter {color:red} + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/input.css:1:58 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/span.rust-debug index 82f50f590de..9d5a2de5895 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +.10; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/input.css:1:5 + | +1 | a { width: +.10; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/span.rust-debug index f20fbf34c99..55fffb992c3 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -.10%; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/input.css:1:5 + | +1 | a { width: -.10%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/span.rust-debug index cfcc8179165..7ebec1cf009 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { box-shadow: rgb(255, 0, 17) 0 0 1 inset } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/input.css:1:5 + | +1 | a { box-shadow: rgb(255, 0, 17) 0 0 1 inset } + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/span.rust-debug index db9a793ff23..de051260470 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { margin: 0 1 0 1 } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/input.css:1:5 + | +1 | a { margin: 0 1 0 1 } + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/span.rust-debug index b1bdcd4d374..84b2b5e4491 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10p\32x } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/input.css:1:5 + | +1 | a { value: 10p\32x } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/span.rust-debug index 3c75ea69285..6b48f66bb89 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; } | ^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:5 + | +1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; } + | ^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:5 | @@ -118,6 +124,12 @@ error: Declaration 1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:29 + | +1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; } + | ^^^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:29 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/span.rust-debug index 093832044c1..9071968dd6f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: id\65nt } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/input.css:1:5 + | +1 | a { value: id\65nt } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/span.rust-debug index 09e6cdd7755..1b2bb9945a0 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/span.rust-debug @@ -76,6 +76,12 @@ error: Declaration 1 | a:after { content: 'a\ b' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/input.css:1:11 + | +1 | a:after { content: 'a\ b' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/input.css:1:11 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/span.rust-debug index d319ca150b0..71e87c82ab9 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: \66n() } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/input.css:1:5 + | +1 | a { value: \66n() } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/span.rust-debug index f5de9d8a868..e1456e63528 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | @keyframes test { from { color: red } to {} } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/input.css:1:26 + | +1 | @keyframes test { from { color: red } to {} } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/input.css:1:26 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/span.rust-debug index 6da64053a55..d26a6e190ca 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #ABCD } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/input.css:1:5 + | +1 | a { color: #ABCD } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/span.rust-debug index 72777f5f1df..91413ca3f6b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #ABBBCCDD } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/input.css:1:5 + | +1 | a { color: #ABBBCCDD } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/span.rust-debug index 9e21d647c32..37acbed1724 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #abcf } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/input.css:1:5 + | +1 | a { color: #abcf } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/span.rust-debug index 746dd9a19c4..bd21630ec0f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: 0.1%; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/input.css:1:5 + | +1 | a { width: 0.1%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/span.rust-debug index e36dddaadaf..d4fdf509cdb 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/span.rust-debug @@ -70,6 +70,12 @@ error: Declaration 1 | @keyframes name { 100% { color: red } } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/input.css:1:26 + | +1 | @keyframes name { 100% { color: red } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/input.css:1:26 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/4-S1C8qZOZ6Mm7WdRUH72Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/4-S1C8qZOZ6Mm7WdRUH72Q/span.rust-debug index 1c265eb15a1..40961bf581c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/4-S1C8qZOZ6Mm7WdRUH72Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/4-S1C8qZOZ6Mm7WdRUH72Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: @\6b eyword } | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/4-S1C8qZOZ6Mm7WdRUH72Q/input.css:1:5 + | +1 | a { value: @\6b eyword } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/4-S1C8qZOZ6Mm7WdRUH72Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/485Ns9qQHa89OJU5Lhjx-Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/485Ns9qQHa89OJU5Lhjx-Q/span.rust-debug index 11b572434fd..12b2d2b8da5 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/485Ns9qQHa89OJU5Lhjx-Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/485Ns9qQHa89OJU5Lhjx-Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: \69 dent } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/485Ns9qQHa89OJU5Lhjx-Q/input.css:1:5 + | +1 | a { value: \69 dent } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/485Ns9qQHa89OJU5Lhjx-Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/486QvEO8dmLFsXYp6xgKVw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/486QvEO8dmLFsXYp6xgKVw/span.rust-debug index 7f5b0a52007..67db84655db 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/486QvEO8dmLFsXYp6xgKVw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/486QvEO8dmLFsXYp6xgKVw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #\30hash } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/486QvEO8dmLFsXYp6xgKVw/input.css:1:5 + | +1 | a { value: #\30hash } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/486QvEO8dmLFsXYp6xgKVw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/4Tjjgepnha63E4UiXXDNEA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/4Tjjgepnha63E4UiXXDNEA/span.rust-debug index f49df3dc6b9..f031eb3ae9c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/4Tjjgepnha63E4UiXXDNEA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/4Tjjgepnha63E4UiXXDNEA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: 0.0; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/4Tjjgepnha63E4UiXXDNEA/input.css:1:5 + | +1 | a { width: 0.0; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/4Tjjgepnha63E4UiXXDNEA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/4WSp4-HbKB-f1GLF00sf6A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/4WSp4-HbKB-f1GLF00sf6A/span.rust-debug index e4856f4b22c..63e5b4ac11a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/4WSp4-HbKB-f1GLF00sf6A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/4WSp4-HbKB-f1GLF00sf6A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { padding: 0 1 0px 1px } | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/4WSp4-HbKB-f1GLF00sf6A/input.css:1:5 + | +1 | a { padding: 0 1 0px 1px } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/4WSp4-HbKB-f1GLF00sf6A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/53OltIbJ-YBXtSKedVvYwA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/53OltIbJ-YBXtSKedVvYwA/span.rust-debug index 5c3a4f7ddeb..0fed95ee562 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/53OltIbJ-YBXtSKedVvYwA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/53OltIbJ-YBXtSKedVvYwA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10\2cx } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/53OltIbJ-YBXtSKedVvYwA/input.css:1:5 + | +1 | a { value: 10\2cx } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/53OltIbJ-YBXtSKedVvYwA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/output.json index fc7be4721f3..bb07f7b221a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 10, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/span.rust-debug index 96c84d6fe67..994d3a9a718 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @u\,nknown; | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/input.css:1:2 | 1 | @u\,nknown; - | ^^^^^^^^^^ + | ^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/5IxIPW9sKkvdZIzfV33AcA/input.css:1:2 + | +1 | @u\,nknown; + | ^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/5al65IRQbw_x4yG3ke74fQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/5al65IRQbw_x4yG3ke74fQ/span.rust-debug index c79da77789f..7bd922b5a3c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/5al65IRQbw_x4yG3ke74fQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/5al65IRQbw_x4yG3ke74fQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +0.1; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/5al65IRQbw_x4yG3ke74fQ/input.css:1:5 + | +1 | a { width: +0.1; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/5al65IRQbw_x4yG3ke74fQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/5cnGKjYPm1XBeqTmw3oCag/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/5cnGKjYPm1XBeqTmw3oCag/span.rust-debug index b7836029844..d3f87161342 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/5cnGKjYPm1XBeqTmw3oCag/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/5cnGKjYPm1XBeqTmw3oCag/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: x\, } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/5cnGKjYPm1XBeqTmw3oCag/input.css:1:5 + | +1 | a { value: x\, } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/5cnGKjYPm1XBeqTmw3oCag/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/5yer6GUWydidDHrfgacUkA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/5yer6GUWydidDHrfgacUkA/span.rust-debug index ba7b40f9b78..4de13818e03 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/5yer6GUWydidDHrfgacUkA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/5yer6GUWydidDHrfgacUkA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #1234 } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/5yer6GUWydidDHrfgacUkA/input.css:1:5 + | +1 | a { color: #1234 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/5yer6GUWydidDHrfgacUkA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/6WYwXsqP1SJOa-6oDBobzQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/6WYwXsqP1SJOa-6oDBobzQ/span.rust-debug index 26573a87ebb..f2eb9f195b9 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/6WYwXsqP1SJOa-6oDBobzQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/6WYwXsqP1SJOa-6oDBobzQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: white } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/6WYwXsqP1SJOa-6oDBobzQ/input.css:1:5 + | +1 | a { color: white } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/6WYwXsqP1SJOa-6oDBobzQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/6aNPFn_YOBL4koYvV-g8pQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/6aNPFn_YOBL4koYvV-g8pQ/span.rust-debug index cac9f8b7425..5df6db2fccb 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/6aNPFn_YOBL4koYvV-g8pQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/6aNPFn_YOBL4koYvV-g8pQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: .0%; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/6aNPFn_YOBL4koYvV-g8pQ/input.css:1:5 + | +1 | a { width: .0%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/6aNPFn_YOBL4koYvV-g8pQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/6kUhG0W7hwZxIuaCsZ7pHg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/6kUhG0W7hwZxIuaCsZ7pHg/span.rust-debug index fca0d4cef60..102bbfb5c6c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/6kUhG0W7hwZxIuaCsZ7pHg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/6kUhG0W7hwZxIuaCsZ7pHg/span.rust-debug @@ -76,6 +76,12 @@ error: Declaration 1 | a:after { content: 'a\62 c' } | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/6kUhG0W7hwZxIuaCsZ7pHg/input.css:1:11 + | +1 | a:after { content: 'a\62 c' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/6kUhG0W7hwZxIuaCsZ7pHg/input.css:1:11 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/7CK6ZYt4CWz7Ge5KWLKBYg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/7CK6ZYt4CWz7Ge5KWLKBYg/span.rust-debug index 4338c990e0d..08a68d43ef8 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/7CK6ZYt4CWz7Ge5KWLKBYg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/7CK6ZYt4CWz7Ge5KWLKBYg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbccef } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/7CK6ZYt4CWz7Ge5KWLKBYg/input.css:1:5 + | +1 | a { color: #aabbccef } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/7CK6ZYt4CWz7Ge5KWLKBYg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/7YGXOizztR38f8fGB1DRaQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/7YGXOizztR38f8fGB1DRaQ/span.rust-debug index 3588c0e1b9a..c3a5feecbca 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/7YGXOizztR38f8fGB1DRaQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/7YGXOizztR38f8fGB1DRaQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -.00%; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/7YGXOizztR38f8fGB1DRaQ/input.css:1:5 + | +1 | a { width: -.00%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/7YGXOizztR38f8fGB1DRaQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/output.json index 5621c77e8c3..108f72f3381 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 11, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/span.rust-debug index e97bede50f0..2ced617cd76 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @u\2cnknown; | ^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/input.css:1:2 | 1 | @u\2cnknown; - | ^^^^^^^^^^^ + | ^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/7q6h33W5r1sx-W3Q7DipjA/input.css:1:2 + | +1 | @u\2cnknown; + | ^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/866Law8W0FQas7QMxFjUbw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/866Law8W0FQas7QMxFjUbw/span.rust-debug index 712105661f7..88fb4cc93d8 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/866Law8W0FQas7QMxFjUbw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/866Law8W0FQas7QMxFjUbw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10x\2c } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/866Law8W0FQas7QMxFjUbw/input.css:1:5 + | +1 | a { value: 10x\2c } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/866Law8W0FQas7QMxFjUbw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/8Gs_Q4kYqijbgIQ6xIW8qw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/8Gs_Q4kYqijbgIQ6xIW8qw/span.rust-debug index 9c4d96848f0..cb01b53018d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/8Gs_Q4kYqijbgIQ6xIW8qw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/8Gs_Q4kYqijbgIQ6xIW8qw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: url(a\62c) } | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/8Gs_Q4kYqijbgIQ6xIW8qw/input.css:1:5 + | +1 | a { value: url(a\62c) } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/8Gs_Q4kYqijbgIQ6xIW8qw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/span.rust-debug index b719aabf16a..aae1345e4b7 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCCFF } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/input.css:1:5 + | +1 | a { color: #AABBCCFF } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/A3jvzrmJH_MIf_Uilsy4sg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/A3jvzrmJH_MIf_Uilsy4sg/span.rust-debug index 21807fa5ac1..0b27369978c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/A3jvzrmJH_MIf_Uilsy4sg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/A3jvzrmJH_MIf_Uilsy4sg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +0.1%; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/A3jvzrmJH_MIf_Uilsy4sg/input.css:1:5 + | +1 | a { width: +0.1%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/A3jvzrmJH_MIf_Uilsy4sg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ACQUsGVQAmGzhMqBRmS6Mw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ACQUsGVQAmGzhMqBRmS6Mw/span.rust-debug index 61080168e70..92e480a1e3c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/ACQUsGVQAmGzhMqBRmS6Mw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/ACQUsGVQAmGzhMqBRmS6Mw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: .10; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ACQUsGVQAmGzhMqBRmS6Mw/input.css:1:5 + | +1 | a { width: .10; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ACQUsGVQAmGzhMqBRmS6Mw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/span.rust-debug index 83ba9c69f9c..d2b0f1eb2aa 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/span.rust-debug @@ -88,6 +88,12 @@ error: Declaration 1 | @keyframes name { 0%, 50% { color: red } 25%, 75% { color: blue } } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/input.css:1:29 + | +1 | @keyframes name { 0%, 50% { color: red } 25%, 75% { color: blue } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/input.css:1:29 | @@ -166,6 +172,12 @@ error: Declaration 1 | @keyframes name { 0%, 50% { color: red } 25%, 75% { color: blue } } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/input.css:1:53 + | +1 | @keyframes name { 0%, 50% { color: red } 25%, 75% { color: blue } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ATZbhYBr7fOFJoZ4E2dwkA/input.css:1:53 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/AVaQlt9z0lhJC6bHHDPVeA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/AVaQlt9z0lhJC6bHHDPVeA/span.rust-debug index 3ac5124e790..e281639fc54 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/AVaQlt9z0lhJC6bHHDPVeA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/AVaQlt9z0lhJC6bHHDPVeA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: x\2c() } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/AVaQlt9z0lhJC6bHHDPVeA/input.css:1:5 + | +1 | a { value: x\2c() } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/AVaQlt9z0lhJC6bHHDPVeA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Afm91-TMNbzd52HsPrCCNA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Afm91-TMNbzd52HsPrCCNA/span.rust-debug index f877ae7770b..eaed0113f24 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Afm91-TMNbzd52HsPrCCNA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Afm91-TMNbzd52HsPrCCNA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #abbbccff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Afm91-TMNbzd52HsPrCCNA/input.css:1:5 + | +1 | a { color: #abbbccff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Afm91-TMNbzd52HsPrCCNA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/span.rust-debug index 8dae129f17d..d348bd7214b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABCCCDD } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/input.css:1:5 + | +1 | a { color: #AABCCCDD } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/AocxkR5Gt30Hu6JV7J56Wg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/AocxkR5Gt30Hu6JV7J56Wg/span.rust-debug index ec8a84a5935..994c11d1eaf 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/AocxkR5Gt30Hu6JV7J56Wg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/AocxkR5Gt30Hu6JV7J56Wg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabccc } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/AocxkR5Gt30Hu6JV7J56Wg/input.css:1:5 + | +1 | a { color: #aabccc } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/AocxkR5Gt30Hu6JV7J56Wg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/AwZM5l5vBlyrbgG-Fk0_EQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/AwZM5l5vBlyrbgG-Fk0_EQ/span.rust-debug index e30e30cbc9b..75a0ddcc0d7 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/AwZM5l5vBlyrbgG-Fk0_EQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/AwZM5l5vBlyrbgG-Fk0_EQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: x\2c } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/AwZM5l5vBlyrbgG-Fk0_EQ/input.css:1:5 + | +1 | a { value: x\2c } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/AwZM5l5vBlyrbgG-Fk0_EQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/BKyQWW5j9vRP-kr41nqcjg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/BKyQWW5j9vRP-kr41nqcjg/span.rust-debug index a3479722e53..6e3d8b90956 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/BKyQWW5j9vRP-kr41nqcjg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/BKyQWW5j9vRP-kr41nqcjg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #\68 ash } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/BKyQWW5j9vRP-kr41nqcjg/input.css:1:5 + | +1 | a { value: #\68 ash } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/BKyQWW5j9vRP-kr41nqcjg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/BrJMdtdKJAuIZIG5MVWUYA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/BrJMdtdKJAuIZIG5MVWUYA/span.rust-debug index 51cfe05e022..ce6225d162d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/BrJMdtdKJAuIZIG5MVWUYA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/BrJMdtdKJAuIZIG5MVWUYA/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | .selector { property: value\9; } | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/BrJMdtdKJAuIZIG5MVWUYA/input.css:1:13 + | +1 | .selector { property: value\9; } + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/BrJMdtdKJAuIZIG5MVWUYA/input.css:1:13 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/C4I0cdQcSbpaGOS-V8fwew/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/C4I0cdQcSbpaGOS-V8fwew/span.rust-debug index 6f6e1082de9..f1189de89d4 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/C4I0cdQcSbpaGOS-V8fwew/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/C4I0cdQcSbpaGOS-V8fwew/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #0h\61sh } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/C4I0cdQcSbpaGOS-V8fwew/input.css:1:5 + | +1 | a { value: #0h\61sh } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/C4I0cdQcSbpaGOS-V8fwew/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/C6gS3Kl0KEwGsFaUUGXzFg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/C6gS3Kl0KEwGsFaUUGXzFg/span.rust-debug index 7a42cda60b1..529f4158e96 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/C6gS3Kl0KEwGsFaUUGXzFg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/C6gS3Kl0KEwGsFaUUGXzFg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #112234ff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/C6gS3Kl0KEwGsFaUUGXzFg/input.css:1:5 + | +1 | a { color: #112234ff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/C6gS3Kl0KEwGsFaUUGXzFg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/CQiowK9DjojqKtlpQifemA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/CQiowK9DjojqKtlpQifemA/span.rust-debug index 49b3052c992..d94837c80cc 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/CQiowK9DjojqKtlpQifemA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/CQiowK9DjojqKtlpQifemA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #ABBBCC } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/CQiowK9DjojqKtlpQifemA/input.css:1:5 + | +1 | a { color: #ABBBCC } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/CQiowK9DjojqKtlpQifemA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/CiejHTPFd8U5szvvY3uRjw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/CiejHTPFd8U5szvvY3uRjw/span.rust-debug index d3fb41bbe46..0e55cf39db2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/CiejHTPFd8U5szvvY3uRjw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/CiejHTPFd8U5szvvY3uRjw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: @\6beyword } | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/CiejHTPFd8U5szvvY3uRjw/input.css:1:5 + | +1 | a { value: @\6beyword } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/CiejHTPFd8U5szvvY3uRjw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/CqrYlHva8qUNgSPb8EwWjg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/CqrYlHva8qUNgSPb8EwWjg/span.rust-debug index 92bff5157cd..cf7173e300a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/CqrYlHva8qUNgSPb8EwWjg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/CqrYlHva8qUNgSPb8EwWjg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 'a\62 c' } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/CqrYlHva8qUNgSPb8EwWjg/input.css:1:5 + | +1 | a { value: 'a\62 c' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/CqrYlHva8qUNgSPb8EwWjg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Cz4vXE_NaBs6qNXE1kUyqQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Cz4vXE_NaBs6qNXE1kUyqQ/span.rust-debug index 2c626f9792c03d086dd43aa88d27d7e6ac6d0e54..e6e6b0d15e1d348063385088c3099ca2af391672 100644 GIT binary patch delta 32 ocmbQlJCARJIP2sIEZiIcMfnA(MJ1IJ1wALHvKnj_XRT%g0IXCB8UO$Q delta 20 ccmbQoH;H$HIP2u;%zl%fu&8gAU}Iwh07yLs4FCWD diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/D5Oyf1ABeS8lie5Lg-5pqg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/D5Oyf1ABeS8lie5Lg-5pqg/span.rust-debug index 981f2406853..bdd62ce127a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/D5Oyf1ABeS8lie5Lg-5pqg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/D5Oyf1ABeS8lie5Lg-5pqg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: x\0 } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/D5Oyf1ABeS8lie5Lg-5pqg/input.css:1:5 + | +1 | a { value: x\0 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/D5Oyf1ABeS8lie5Lg-5pqg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/DrlXteRB-ppLVxi4_N4dhA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/DrlXteRB-ppLVxi4_N4dhA/span.rust-debug index b79e5b437f9..d161a7e3e8b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/DrlXteRB-ppLVxi4_N4dhA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/DrlXteRB-ppLVxi4_N4dhA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: \2cx } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/DrlXteRB-ppLVxi4_N4dhA/input.css:1:5 + | +1 | a { value: \2cx } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/DrlXteRB-ppLVxi4_N4dhA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/EJPa4WhTn_fRRrDiA2bczg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/EJPa4WhTn_fRRrDiA2bczg/span.rust-debug index 941b1b7436e..378eb96c96b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/EJPa4WhTn_fRRrDiA2bczg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/EJPa4WhTn_fRRrDiA2bczg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbcc } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/EJPa4WhTn_fRRrDiA2bczg/input.css:1:5 + | +1 | a { color: #aabbcc } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/EJPa4WhTn_fRRrDiA2bczg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/EYFn-trzBus37dDEvK1jUQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/EYFn-trzBus37dDEvK1jUQ/span.rust-debug index c27e29be136..ba34938ff50 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/EYFn-trzBus37dDEvK1jUQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/EYFn-trzBus37dDEvK1jUQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #122233 } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/EYFn-trzBus37dDEvK1jUQ/input.css:1:5 + | +1 | a { color: #122233 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/EYFn-trzBus37dDEvK1jUQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ElFW4lY06Cb-VFYtK0WX4A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ElFW4lY06Cb-VFYtK0WX4A/span.rust-debug index 2c01f1bc379..9bf4d4ec95e 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/ElFW4lY06Cb-VFYtK0WX4A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/ElFW4lY06Cb-VFYtK0WX4A/span.rust-debug @@ -88,6 +88,12 @@ error: Declaration 1 | @-moz-document url-prefix() { h1 { color: green } } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ElFW4lY06Cb-VFYtK0WX4A/input.css:1:36 + | +1 | @-moz-document url-prefix() { h1 { color: green } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ElFW4lY06Cb-VFYtK0WX4A/input.css:1:36 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/F-AbRDwG_3dGLhE7pzr5aA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/F-AbRDwG_3dGLhE7pzr5aA/span.rust-debug index 54071b9c5e2..82c049209f7 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/F-AbRDwG_3dGLhE7pzr5aA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/F-AbRDwG_3dGLhE7pzr5aA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: x\1 } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/F-AbRDwG_3dGLhE7pzr5aA/input.css:1:5 + | +1 | a { value: x\1 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/F-AbRDwG_3dGLhE7pzr5aA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/FTOGKsI_y1QxMNEu_Fgq7Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/FTOGKsI_y1QxMNEu_Fgq7Q/span.rust-debug index a5c73003714..11bd12c3cfe 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/FTOGKsI_y1QxMNEu_Fgq7Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/FTOGKsI_y1QxMNEu_Fgq7Q/span.rust-debug @@ -40,6 +40,12 @@ error: Declaration 1 | @page { color: red; @top-left {} } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/FTOGKsI_y1QxMNEu_Fgq7Q/input.css:1:9 + | +1 | @page { color: red; @top-left {} } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/FTOGKsI_y1QxMNEu_Fgq7Q/input.css:1:9 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/FlqjDLebWxQvNIxKppBllw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/FlqjDLebWxQvNIxKppBllw/span.rust-debug index c99a7ac4151..21d4472a09e 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/FlqjDLebWxQvNIxKppBllw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/FlqjDLebWxQvNIxKppBllw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbcd } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/FlqjDLebWxQvNIxKppBllw/input.css:1:5 + | +1 | a { color: #aabbcd } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/FlqjDLebWxQvNIxKppBllw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Fm7gvlx7uRyvrfzUC7rJxg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Fm7gvlx7uRyvrfzUC7rJxg/span.rust-debug index 294db5a44d6..7ca28a28e41 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Fm7gvlx7uRyvrfzUC7rJxg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Fm7gvlx7uRyvrfzUC7rJxg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #x\, } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Fm7gvlx7uRyvrfzUC7rJxg/input.css:1:5 + | +1 | a { value: #x\, } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Fm7gvlx7uRyvrfzUC7rJxg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/GC0pcFQY1xSlq9QsgSvEVg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/GC0pcFQY1xSlq9QsgSvEVg/span.rust-debug index 11df1ebf473..f91c060bbb0 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/GC0pcFQY1xSlq9QsgSvEVg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/GC0pcFQY1xSlq9QsgSvEVg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -.0; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/GC0pcFQY1xSlq9QsgSvEVg/input.css:1:5 + | +1 | a { width: -.0; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/GC0pcFQY1xSlq9QsgSvEVg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/GI1rffTXev-78n9ei_53wQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/GI1rffTXev-78n9ei_53wQ/span.rust-debug index 0eed5df50ad..893937035a2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/GI1rffTXev-78n9ei_53wQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/GI1rffTXev-78n9ei_53wQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: '\1' } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/GI1rffTXev-78n9ei_53wQ/input.css:1:5 + | +1 | a { value: '\1' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/GI1rffTXev-78n9ei_53wQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/GpePX8ZJM8IP14hXFTKKxQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/GpePX8ZJM8IP14hXFTKKxQ/span.rust-debug index 27f58811d2d..95d3f8dbe8a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/GpePX8ZJM8IP14hXFTKKxQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/GpePX8ZJM8IP14hXFTKKxQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: x\,() } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/GpePX8ZJM8IP14hXFTKKxQ/input.css:1:5 + | +1 | a { value: x\,() } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/GpePX8ZJM8IP14hXFTKKxQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/span.rust-debug index e703a6a4580..1bc1470b52c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | .decl { a: b; c: d } | ^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/input.css:1:9 + | +1 | .decl { a: b; c: d } + | ^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/input.css:1:9 | @@ -88,6 +94,12 @@ error: Declaration 1 | .decl { a: b; c: d } | ^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/input.css:1:15 + | +1 | .decl { a: b; c: d } + | ^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Gt3Lw4L5Pe4aLLDPz9cxRg/input.css:1:15 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/HDNE73X9waUrBkTAzz-20g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/HDNE73X9waUrBkTAzz-20g/span.rust-debug index e5c1c128322..0e66b7bfd40 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/HDNE73X9waUrBkTAzz-20g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/HDNE73X9waUrBkTAzz-20g/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #h\61sh } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/HDNE73X9waUrBkTAzz-20g/input.css:1:5 + | +1 | a { value: #h\61sh } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/HDNE73X9waUrBkTAzz-20g/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/HWU09nmB9oZX7WY8zUbrnA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/HWU09nmB9oZX7WY8zUbrnA/span.rust-debug index 182b2180490..929a197b639 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/HWU09nmB9oZX7WY8zUbrnA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/HWU09nmB9oZX7WY8zUbrnA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -0.1%; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/HWU09nmB9oZX7WY8zUbrnA/input.css:1:5 + | +1 | a { width: -0.1%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/HWU09nmB9oZX7WY8zUbrnA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Jmhb8p_Oc2-nzkcDSk0dww/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Jmhb8p_Oc2-nzkcDSk0dww/span.rust-debug index 5df6566bc2b..f1371746ee7 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Jmhb8p_Oc2-nzkcDSk0dww/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Jmhb8p_Oc2-nzkcDSk0dww/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | @keyframes name { from { color: red } } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Jmhb8p_Oc2-nzkcDSk0dww/input.css:1:26 + | +1 | @keyframes name { from { color: red } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Jmhb8p_Oc2-nzkcDSk0dww/input.css:1:26 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/output.json index c97ed1ddce9..57baf86e489 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 8, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/span.rust-debug index 4765a969d96..11ac5aeafb6 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/span.rust-debug @@ -34,11 +34,17 @@ error: UnknownAtRule 4 | | } | |_^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/input.css:1:2 | 1 | @unknown{ - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/input.css:1:2 + | +1 | @unknown{ + | ^^^^^^^ error: SimpleBlock --> $DIR/tests/fixture/esbuild/misc/L0mEf41IMkWcP7NotllkAg/input.css:1:9 diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/span.rust-debug index ecd3226d3a2..72ccb259caf 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABCCC } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/input.css:1:5 + | +1 | a { color: #AABCCC } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/MK5PGiCFMf7RHDp05gnDCw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/MK5PGiCFMf7RHDp05gnDCw/span.rust-debug index 76fb29d3f79..210b3fa9b50 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/MK5PGiCFMf7RHDp05gnDCw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/MK5PGiCFMf7RHDp05gnDCw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbccdd } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/MK5PGiCFMf7RHDp05gnDCw/input.css:1:5 + | +1 | a { color: #aabbccdd } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/MK5PGiCFMf7RHDp05gnDCw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/MMBANlJKeKQw886fHOYiHA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/MMBANlJKeKQw886fHOYiHA/span.rust-debug index e2e293338b6..7e2321f2186 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/MMBANlJKeKQw886fHOYiHA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/MMBANlJKeKQw886fHOYiHA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10\32x } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/MMBANlJKeKQw886fHOYiHA/input.css:1:5 + | +1 | a { value: 10\32x } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/MMBANlJKeKQw886fHOYiHA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/MU8JgGd_-h5ocqkfawNxeQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/MU8JgGd_-h5ocqkfawNxeQ/span.rust-debug index 28f6e20f9f8..ca374ecf72c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/MU8JgGd_-h5ocqkfawNxeQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/MU8JgGd_-h5ocqkfawNxeQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #abbbccdd } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/MU8JgGd_-h5ocqkfawNxeQ/input.css:1:5 + | +1 | a { color: #abbbccdd } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/MU8JgGd_-h5ocqkfawNxeQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Mdtiu_Fpfso6gXZMciRJgw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Mdtiu_Fpfso6gXZMciRJgw/span.rust-debug index 01aec49ff48..cfc7eb7358c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Mdtiu_Fpfso6gXZMciRJgw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Mdtiu_Fpfso6gXZMciRJgw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10\65m } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Mdtiu_Fpfso6gXZMciRJgw/input.css:1:5 + | +1 | a { value: 10\65m } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Mdtiu_Fpfso6gXZMciRJgw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/MmOsa9XFdPMS9x4ITbWSzg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/MmOsa9XFdPMS9x4ITbWSzg/span.rust-debug index 2fcf797b098..c132395b20a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/MmOsa9XFdPMS9x4ITbWSzg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/MmOsa9XFdPMS9x4ITbWSzg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -.00; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/MmOsa9XFdPMS9x4ITbWSzg/input.css:1:5 + | +1 | a { width: -.00; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/MmOsa9XFdPMS9x4ITbWSzg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/MxxFvoxSpp02tFmpbNdA8g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/MxxFvoxSpp02tFmpbNdA8g/span.rust-debug index 0f84118d918..6bb0320466d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/MxxFvoxSpp02tFmpbNdA8g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/MxxFvoxSpp02tFmpbNdA8g/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: '\0' } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/MxxFvoxSpp02tFmpbNdA8g/input.css:1:5 + | +1 | a { value: '\0' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/MxxFvoxSpp02tFmpbNdA8g/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/NGFFzFWLONNmgWPM_FpiZg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/NGFFzFWLONNmgWPM_FpiZg/span.rust-debug index da7d588a4bb..5b5083c77f1 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/NGFFzFWLONNmgWPM_FpiZg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/NGFFzFWLONNmgWPM_FpiZg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +.00%; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/NGFFzFWLONNmgWPM_FpiZg/input.css:1:5 + | +1 | a { width: +.00%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/NGFFzFWLONNmgWPM_FpiZg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/O2EvcnNp_CVyX3xq5-eM-g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/O2EvcnNp_CVyX3xq5-eM-g/span.rust-debug index f1cb7eabb7a..b5b62d7f0b2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/O2EvcnNp_CVyX3xq5-eM-g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/O2EvcnNp_CVyX3xq5-eM-g/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | | b' } | |__^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/O2EvcnNp_CVyX3xq5-eM-g/input.css:1:11 + | +1 | a:after { content: 'a\ + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/O2EvcnNp_CVyX3xq5-eM-g/input.css:1:11 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/OFqVy3cBzYnrIy6uze5Nuw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/OFqVy3cBzYnrIy6uze5Nuw/span.rust-debug index 5fa4f1c2349..4b18a53365f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/OFqVy3cBzYnrIy6uze5Nuw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/OFqVy3cBzYnrIy6uze5Nuw/span.rust-debug @@ -94,6 +94,12 @@ error: Declaration 1 | @keyframes test { from {} to { color: red } } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/OFqVy3cBzYnrIy6uze5Nuw/input.css:1:32 + | +1 | @keyframes test { from {} to { color: red } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/OFqVy3cBzYnrIy6uze5Nuw/input.css:1:32 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/span.rust-debug index bbbf448e679..cb02cfc83eb 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCCDE } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/input.css:1:5 + | +1 | a { color: #AABBCCDE } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/OtM9lGhbFLqI-r3dvNTUjQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/OtM9lGhbFLqI-r3dvNTUjQ/span.rust-debug index b0da021b185..d60c80d6dd7 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/OtM9lGhbFLqI-r3dvNTUjQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/OtM9lGhbFLqI-r3dvNTUjQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -.10; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/OtM9lGhbFLqI-r3dvNTUjQ/input.css:1:5 + | +1 | a { width: -.10; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/OtM9lGhbFLqI-r3dvNTUjQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/PSncmPJMuHC-CjpwiYtkDw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/PSncmPJMuHC-CjpwiYtkDw/span.rust-debug index fa2b1cd01cc..fc93f5d01c5 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/PSncmPJMuHC-CjpwiYtkDw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/PSncmPJMuHC-CjpwiYtkDw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { border-top-left-radius: 0 0 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/PSncmPJMuHC-CjpwiYtkDw/input.css:1:5 + | +1 | a { border-top-left-radius: 0 0 } + | ^^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/PSncmPJMuHC-CjpwiYtkDw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Q_wA-fPw3o2m3R7gyWNxbQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Q_wA-fPw3o2m3R7gyWNxbQ/span.rust-debug index 83afb2820d9..982f9a508a5 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Q_wA-fPw3o2m3R7gyWNxbQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Q_wA-fPw3o2m3R7gyWNxbQ/span.rust-debug @@ -76,6 +76,12 @@ error: Declaration 1 | a:after { content: '\invalid' } | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Q_wA-fPw3o2m3R7gyWNxbQ/input.css:1:11 + | +1 | a:after { content: '\invalid' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Q_wA-fPw3o2m3R7gyWNxbQ/input.css:1:11 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/span.rust-debug index 1e93bda26d3..1d5c3d73325 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCCEF } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/input.css:1:5 + | +1 | a { color: #AABBCCEF } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/output.json index 60fdaff6d0c..48ab674b386 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 10, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/span.rust-debug index 88ec045d5fa..825b0b37ec8 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @\75nknown; | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/input.css:1:2 | 1 | @\75nknown; - | ^^^^^^^^^^ + | ^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/RgnvIbTq0R1ivptC3lTYbQ/input.css:1:2 + | +1 | @\75nknown; + | ^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/RmGccmub1dooAN8WPKTwhQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/RmGccmub1dooAN8WPKTwhQ/span.rust-debug index 3f23bfa372d..9fb184a6798 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/RmGccmub1dooAN8WPKTwhQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/RmGccmub1dooAN8WPKTwhQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #123f } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/RmGccmub1dooAN8WPKTwhQ/input.css:1:5 + | +1 | a { color: #123f } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/RmGccmub1dooAN8WPKTwhQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Rq1DOaNCa5Dl2jaozalLXQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Rq1DOaNCa5Dl2jaozalLXQ/span.rust-debug index 10b414aa340..be240b98fda 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Rq1DOaNCa5Dl2jaozalLXQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Rq1DOaNCa5Dl2jaozalLXQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { box-shadow: inset 0px 0px 0px 0px black } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Rq1DOaNCa5Dl2jaozalLXQ/input.css:1:5 + | +1 | a { box-shadow: inset 0px 0px 0px 0px black } + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Rq1DOaNCa5Dl2jaozalLXQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/S2Mhk5rU2YxQPgm9rtF9WA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/S2Mhk5rU2YxQPgm9rtF9WA/span.rust-debug index 515aa7530fc..b2fb22e3c43 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/S2Mhk5rU2YxQPgm9rtF9WA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/S2Mhk5rU2YxQPgm9rtF9WA/span.rust-debug @@ -100,6 +100,12 @@ error: Declaration 1 | @document url("https://www.example.com/") { h1 { color: green } } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/S2Mhk5rU2YxQPgm9rtF9WA/input.css:1:50 + | +1 | @document url("https://www.example.com/") { h1 { color: green } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/S2Mhk5rU2YxQPgm9rtF9WA/input.css:1:50 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/span.rust-debug index d14c1202f6d..828f26b41bd 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #ABCF } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/input.css:1:5 + | +1 | a { color: #ABCF } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/output.json index df0ab8acd96..31e725d0acd 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 8, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/span.rust-debug index 6cdf76b914b..4ec0a65dfef 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/span.rust-debug @@ -22,11 +22,17 @@ error: UnknownAtRule 1 | @unknown x; | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/input.css:1:2 | 1 | @unknown x; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/input.css:1:2 + | +1 | @unknown x; + | ^^^^^^^ error: Value --> $DIR/tests/fixture/esbuild/misc/SnMCumHJazvlgOXgmxJ9Jg/input.css:1:9 diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Ssg_Qhdw7h_c6ZtY52Qe4A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Ssg_Qhdw7h_c6ZtY52Qe4A/span.rust-debug index 9a4ce628061..7b4e9017e10 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Ssg_Qhdw7h_c6ZtY52Qe4A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Ssg_Qhdw7h_c6ZtY52Qe4A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #112333ff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Ssg_Qhdw7h_c6ZtY52Qe4A/input.css:1:5 + | +1 | a { color: #112333ff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Ssg_Qhdw7h_c6ZtY52Qe4A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/T1SOp4KXmIb1WNsyPFEKqg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/T1SOp4KXmIb1WNsyPFEKqg/span.rust-debug index 778c5762328..62e69838fe2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/T1SOp4KXmIb1WNsyPFEKqg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/T1SOp4KXmIb1WNsyPFEKqg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbccde } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/T1SOp4KXmIb1WNsyPFEKqg/input.css:1:5 + | +1 | a { color: #aabbccde } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/T1SOp4KXmIb1WNsyPFEKqg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/span.rust-debug index f47815873c8..8c47c88123c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | @keyframes name{from{color:red}to{color:blue}} | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/input.css:1:22 + | +1 | @keyframes name{from{color:red}to{color:blue}} + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/input.css:1:22 | @@ -118,6 +124,12 @@ error: Declaration 1 | @keyframes name{from{color:red}to{color:blue}} | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/input.css:1:35 + | +1 | @keyframes name{from{color:red}to{color:blue}} + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/TB0HbwEy-7bhtK7ck9tHKQ/input.css:1:35 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/TyMkoZpPOEhvUBOmUhGOXQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/TyMkoZpPOEhvUBOmUhGOXQ/span.rust-debug index 8a895feccad..ab2d53a1e4d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/TyMkoZpPOEhvUBOmUhGOXQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/TyMkoZpPOEhvUBOmUhGOXQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: \,x } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/TyMkoZpPOEhvUBOmUhGOXQ/input.css:1:5 + | +1 | a { value: \,x } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/TyMkoZpPOEhvUBOmUhGOXQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/span.rust-debug index e6196885292..6094b6c7202 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCD } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/input.css:1:5 + | +1 | a { color: #AABBCD } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Uuvi9sS4YR_ILpKl0xpfOg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Uuvi9sS4YR_ILpKl0xpfOg/span.rust-debug index 1ae90dd797f..14e7c1dd91b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Uuvi9sS4YR_ILpKl0xpfOg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Uuvi9sS4YR_ILpKl0xpfOg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: url(a\62 c) } | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Uuvi9sS4YR_ILpKl0xpfOg/input.css:1:5 + | +1 | a { value: url(a\62 c) } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Uuvi9sS4YR_ILpKl0xpfOg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/span.rust-debug index 41a502ec2b3..8fdd643b646 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 2 | @page :first { margin: 0 } | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:2:18 + | +2 | @page :first { margin: 0 } + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:2:18 | @@ -194,6 +200,12 @@ error: Declaration 4 | @top-left-corner { content: 'tlc' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:4:23 + | +4 | @top-left-corner { content: 'tlc' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:4:23 | @@ -278,6 +290,12 @@ error: Declaration 5 | @top-left { content: 'tl' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:5:16 + | +5 | @top-left { content: 'tl' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:5:16 | @@ -362,6 +380,12 @@ error: Declaration 6 | @top-center { content: 'tc' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:6:18 + | +6 | @top-center { content: 'tc' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:6:18 | @@ -446,6 +470,12 @@ error: Declaration 7 | @top-right { content: 'tr' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:7:17 + | +7 | @top-right { content: 'tr' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:7:17 | @@ -530,6 +560,12 @@ error: Declaration 8 | @top-right-corner { content: 'trc' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:8:24 + | +8 | @top-right-corner { content: 'trc' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:8:24 | @@ -614,6 +650,12 @@ error: Declaration 9 | @bottom-left-corner { content: 'blc' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:9:26 + | +9 | @bottom-left-corner { content: 'blc' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:9:26 | @@ -698,6 +740,12 @@ error: Declaration 10 | @bottom-left { content: 'bl' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:10:19 + | +10 | @bottom-left { content: 'bl' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:10:19 | @@ -782,6 +830,12 @@ error: Declaration 11 | @bottom-center { content: 'bc' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:11:21 + | +11 | @bottom-center { content: 'bc' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:11:21 | @@ -866,6 +920,12 @@ error: Declaration 12 | @bottom-right { content: 'br' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:12:20 + | +12 | @bottom-right { content: 'br' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:12:20 | @@ -950,6 +1010,12 @@ error: Declaration 13 | @bottom-right-corner { content: 'brc' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:13:27 + | +13 | @bottom-right-corner { content: 'brc' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:13:27 | @@ -1034,6 +1100,12 @@ error: Declaration 14 | @left-top { content: 'lt' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:14:16 + | +14 | @left-top { content: 'lt' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:14:16 | @@ -1118,6 +1190,12 @@ error: Declaration 15 | @left-middle { content: 'lm' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:15:19 + | +15 | @left-middle { content: 'lm' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:15:19 | @@ -1202,6 +1280,12 @@ error: Declaration 16 | @left-bottom { content: 'lb' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:16:19 + | +16 | @left-bottom { content: 'lb' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:16:19 | @@ -1286,6 +1370,12 @@ error: Declaration 17 | @right-top { content: 'rt' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:17:17 + | +17 | @right-top { content: 'rt' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:17:17 | @@ -1370,6 +1460,12 @@ error: Declaration 18 | @right-middle { content: 'rm' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:18:20 + | +18 | @right-middle { content: 'rm' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:18:20 | @@ -1454,6 +1550,12 @@ error: Declaration 19 | @right-bottom { content: 'rb' } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:19:20 + | +19 | @right-bottom { content: 'rb' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/VOQJsreB5pi_yJysozWgcA/input.css:19:20 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/span.rust-debug index b843cc768ed..bc9796f18c8 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCCDD } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/input.css:1:5 + | +1 | a { color: #AABBCCDD } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/span.rust-debug index 4fd97708813..4d0636cde14 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5; } | ^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/input.css:1:5 + | +1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5; } + | ^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/input.css:1:5 | @@ -118,6 +124,12 @@ error: Declaration 1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5; } | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/input.css:1:29 + | +1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5; } + | ^^^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Wb-aVu7CEQfCy1QL2yUrEw/input.css:1:29 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Wplrqmb_IDjNC-o-eqLw4A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Wplrqmb_IDjNC-o-eqLw4A/span.rust-debug index 86479751b8f..2215675f5a1 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Wplrqmb_IDjNC-o-eqLw4A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Wplrqmb_IDjNC-o-eqLw4A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: \,x() } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Wplrqmb_IDjNC-o-eqLw4A/input.css:1:5 + | +1 | a { value: \,x() } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Wplrqmb_IDjNC-o-eqLw4A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/X-yuwO0x1B-l1Js4JkKJZg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/X-yuwO0x1B-l1Js4JkKJZg/span.rust-debug index a7b24449c1c..9eead6c4f0d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/X-yuwO0x1B-l1Js4JkKJZg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/X-yuwO0x1B-l1Js4JkKJZg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +0.0; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/X-yuwO0x1B-l1Js4JkKJZg/input.css:1:5 + | +1 | a { width: +0.0; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/X-yuwO0x1B-l1Js4JkKJZg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/X0UTnZK8bQhMRs3DGoqFAw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/X0UTnZK8bQhMRs3DGoqFAw/span.rust-debug index ab183b5b6ad..8ee14edc719 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/X0UTnZK8bQhMRs3DGoqFAw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/X0UTnZK8bQhMRs3DGoqFAw/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | @keyframes test { from { color: red } to {} } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/X0UTnZK8bQhMRs3DGoqFAw/input.css:1:26 + | +1 | @keyframes test { from { color: red } to {} } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/X0UTnZK8bQhMRs3DGoqFAw/input.css:1:26 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/output.json index 534ee3e6c8a..7a73c985139 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 10, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/span.rust-debug index e36125d16f5..4287102675d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @u\6eknown; | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/input.css:1:2 | 1 | @u\6eknown; - | ^^^^^^^^^^ + | ^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/XzgibMiqPC2Svd-zi3M4jA/input.css:1:2 + | +1 | @u\6eknown; + | ^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/YIW6UUMmxrTYJjJ3JSL3uQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/YIW6UUMmxrTYJjJ3JSL3uQ/span.rust-debug index 396a44f5fdb..2bb346ce617 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/YIW6UUMmxrTYJjJ3JSL3uQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/YIW6UUMmxrTYJjJ3JSL3uQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #112234 } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/YIW6UUMmxrTYJjJ3JSL3uQ/input.css:1:5 + | +1 | a { color: #112234 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/YIW6UUMmxrTYJjJ3JSL3uQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Yc70giIIGDIddrjD858dDw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Yc70giIIGDIddrjD858dDw/span.rust-debug index f3e78dac1a6..a9f5b3b5a97 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Yc70giIIGDIddrjD858dDw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Yc70giIIGDIddrjD858dDw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: '' } | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Yc70giIIGDIddrjD858dDw/input.css:1:5 + | +1 | a { value: '' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Yc70giIIGDIddrjD858dDw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Ys7z8C2qi5O_HM9ElZQrUQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Ys7z8C2qi5O_HM9ElZQrUQ/span.rust-debug index f48fc5ae8ec..50cccab5364 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Ys7z8C2qi5O_HM9ElZQrUQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Ys7z8C2qi5O_HM9ElZQrUQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #\,x } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Ys7z8C2qi5O_HM9ElZQrUQ/input.css:1:5 + | +1 | a { value: #\,x } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Ys7z8C2qi5O_HM9ElZQrUQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/Z4J4sVA4UnGhTMiN5tdMMQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/Z4J4sVA4UnGhTMiN5tdMMQ/span.rust-debug index e49aab7dcc1..19150d659a7 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/Z4J4sVA4UnGhTMiN5tdMMQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/Z4J4sVA4UnGhTMiN5tdMMQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { padding: 0 1 0 1 } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/Z4J4sVA4UnGhTMiN5tdMMQ/input.css:1:5 + | +1 | a { padding: 0 1 0 1 } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/Z4J4sVA4UnGhTMiN5tdMMQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/output.json index 198e40a5a76..ad519312a69 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 8, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/span.rust-debug index 3ae0717ed72..6dbbbaa3a1a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/span.rust-debug @@ -22,11 +22,17 @@ error: UnknownAtRule 1 | @unknown{} | ^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/input.css:1:2 | 1 | @unknown{} - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/input.css:1:2 + | +1 | @unknown{} + | ^^^^^^^ error: SimpleBlock --> $DIR/tests/fixture/esbuild/misc/_-29x4xnx6IaJMmYrOsypA/input.css:1:9 diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/output.json index bc308a3fc37..7a02e7717c2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 8, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/span.rust-debug index 8c858a49783..bd22a5f894c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @unknown | ^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/input.css:1:2 | 1 | @unknown - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/_5pJ5Q6EBxzG4SOkB9Qoow/input.css:1:2 + | +1 | @unknown + | ^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/span.rust-debug index 48ae1213262..27348f2952d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCDFF } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/input.css:1:5 + | +1 | a { color: #AABBCDFF } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/output.json index 359121eb171..2661df0b154 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 11, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/span.rust-debug index 9b9246965fe..9d8f140c963 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @\2cunknown; | ^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/input.css:1:2 | 1 | @\2cunknown; - | ^^^^^^^^^^^ + | ^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/_PPlU8tyR27_briQT0VeOg/input.css:1:2 + | +1 | @\2cunknown; + | ^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/_U4zAUbS93Xo7_tJOolGuA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/_U4zAUbS93Xo7_tJOolGuA/span.rust-debug index 5dc6bbc461a..04a0baa3aaa 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/_U4zAUbS93Xo7_tJOolGuA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/_U4zAUbS93Xo7_tJOolGuA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #f00 } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/_U4zAUbS93Xo7_tJOolGuA/input.css:1:5 + | +1 | a { color: #f00 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/_U4zAUbS93Xo7_tJOolGuA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/span.rust-debug index b6398c97168..caa7028adf9 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABCCCFF } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/input.css:1:5 + | +1 | a { color: #AABCCCFF } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/span.rust-debug index 6a513f28c7e..0b3d5e80c1b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCDDD } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/input.css:1:5 + | +1 | a { color: #AABBCDDD } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/aDkLP2LEPmyD_ImzrGw8SQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/aDkLP2LEPmyD_ImzrGw8SQ/span.rust-debug index a6d6210a82c..18664ab7622 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/aDkLP2LEPmyD_ImzrGw8SQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/aDkLP2LEPmyD_ImzrGw8SQ/span.rust-debug @@ -94,6 +94,12 @@ error: Declaration 1 | @keyframes test { from {} to { color: red } } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/aDkLP2LEPmyD_ImzrGw8SQ/input.css:1:32 + | +1 | @keyframes test { from {} to { color: red } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/aDkLP2LEPmyD_ImzrGw8SQ/input.css:1:32 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/aVoVLZHijXjMsJvx4rbJGQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/aVoVLZHijXjMsJvx4rbJGQ/span.rust-debug index e3e8cacd69a..66869bf4c2f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/aVoVLZHijXjMsJvx4rbJGQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/aVoVLZHijXjMsJvx4rbJGQ/span.rust-debug @@ -34,6 +34,12 @@ error: Declaration 1 | @viewport { width: 100vw } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/aVoVLZHijXjMsJvx4rbJGQ/input.css:1:13 + | +1 | @viewport { width: 100vw } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/aVoVLZHijXjMsJvx4rbJGQ/input.css:1:13 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/span.rust-debug index 2dc71df7e4d..b7a1cd0e14c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | .decl { a: b; c: d; } | ^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/input.css:1:9 + | +1 | .decl { a: b; c: d; } + | ^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/input.css:1:9 | @@ -88,6 +94,12 @@ error: Declaration 1 | .decl { a: b; c: d; } | ^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/input.css:1:15 + | +1 | .decl { a: b; c: d; } + | ^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/avMO0PRST3qaooxANKWiIw/input.css:1:15 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/axTS8OYqxbJ3cRQm9h4ZYA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/axTS8OYqxbJ3cRQm9h4ZYA/span.rust-debug index 93be4acfa4d..3e5d8e2df12 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/axTS8OYqxbJ3cRQm9h4ZYA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/axTS8OYqxbJ3cRQm9h4ZYA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: '\61 bc' } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/axTS8OYqxbJ3cRQm9h4ZYA/input.css:1:5 + | +1 | a { value: '\61 bc' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/axTS8OYqxbJ3cRQm9h4ZYA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/b102IE1MrM3aGTKCRrSU6Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/b102IE1MrM3aGTKCRrSU6Q/span.rust-debug index a85e75403ff..a778f2d53fb 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/b102IE1MrM3aGTKCRrSU6Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/b102IE1MrM3aGTKCRrSU6Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #ff0000ff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/b102IE1MrM3aGTKCRrSU6Q/input.css:1:5 + | +1 | a { color: #ff0000ff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/b102IE1MrM3aGTKCRrSU6Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/b2m1STf0F5CKity6Nd4vmQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/b2m1STf0F5CKity6Nd4vmQ/span.rust-debug index 8a0b5455eda..5076a259c78 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/b2m1STf0F5CKity6Nd4vmQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/b2m1STf0F5CKity6Nd4vmQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbccff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/b2m1STf0F5CKity6Nd4vmQ/input.css:1:5 + | +1 | a { color: #aabbccff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/b2m1STf0F5CKity6Nd4vmQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/b6WBp-DsAKNB9xg6pcRTzQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/b6WBp-DsAKNB9xg6pcRTzQ/span.rust-debug index 3896f3f3a37..4ed1c28add3 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/b6WBp-DsAKNB9xg6pcRTzQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/b6WBp-DsAKNB9xg6pcRTzQ/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | .decl { a: b; } | ^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/b6WBp-DsAKNB9xg6pcRTzQ/input.css:1:9 + | +1 | .decl { a: b; } + | ^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/b6WBp-DsAKNB9xg6pcRTzQ/input.css:1:9 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/bMhJJBpJJs8SIl3cQ4UjFw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/bMhJJBpJJs8SIl3cQ4UjFw/span.rust-debug index bc63da21339..8e07b630b69 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/bMhJJBpJJs8SIl3cQ4UjFw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/bMhJJBpJJs8SIl3cQ4UjFw/span.rust-debug @@ -40,6 +40,12 @@ error: Declaration 1 | @page { color: red; @top-left {} } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/bMhJJBpJJs8SIl3cQ4UjFw/input.css:1:9 + | +1 | @page { color: red; @top-left {} } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/bMhJJBpJJs8SIl3cQ4UjFw/input.css:1:9 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/bO5VdzMYGbUbK2CCYCMKTA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/bO5VdzMYGbUbK2CCYCMKTA/span.rust-debug index 756caa77e31..0fa91ffb7e6 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/bO5VdzMYGbUbK2CCYCMKTA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/bO5VdzMYGbUbK2CCYCMKTA/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | .decl { a: b } | ^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/bO5VdzMYGbUbK2CCYCMKTA/input.css:1:9 + | +1 | .decl { a: b } + | ^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/bO5VdzMYGbUbK2CCYCMKTA/input.css:1:9 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/bdiLSVQWZCfQNNwD_OM6qA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/bdiLSVQWZCfQNNwD_OM6qA/span.rust-debug index 42c5d16c8e4..4fc604784b7 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/bdiLSVQWZCfQNNwD_OM6qA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/bdiLSVQWZCfQNNwD_OM6qA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #\68ash } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/bdiLSVQWZCfQNNwD_OM6qA/input.css:1:5 + | +1 | a { value: #\68ash } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/bdiLSVQWZCfQNNwD_OM6qA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/biImEvafuG5pEuEW8LgCCw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/biImEvafuG5pEuEW8LgCCw/span.rust-debug index e91008fef1d..a97fb87dae6 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/biImEvafuG5pEuEW8LgCCw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/biImEvafuG5pEuEW8LgCCw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: f\6e() } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/biImEvafuG5pEuEW8LgCCw/input.css:1:5 + | +1 | a { value: f\6e() } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/biImEvafuG5pEuEW8LgCCw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/cFk0V1dktTRk2wWOux0Y9A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/cFk0V1dktTRk2wWOux0Y9A/span.rust-debug index ad875728310..05131a9f34f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/cFk0V1dktTRk2wWOux0Y9A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/cFk0V1dktTRk2wWOux0Y9A/span.rust-debug @@ -76,6 +76,12 @@ error: Declaration 1 | a:after { content: '\1010101' } | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/cFk0V1dktTRk2wWOux0Y9A/input.css:1:11 + | +1 | a:after { content: '\1010101' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/cFk0V1dktTRk2wWOux0Y9A/input.css:1:11 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/cGdUJvMcb_06jPxvv8lGkg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/cGdUJvMcb_06jPxvv8lGkg/span.rust-debug index 925eb625269..d0902712a86 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/cGdUJvMcb_06jPxvv8lGkg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/cGdUJvMcb_06jPxvv8lGkg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +.0%; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/cGdUJvMcb_06jPxvv8lGkg/input.css:1:5 + | +1 | a { width: +.0%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/cGdUJvMcb_06jPxvv8lGkg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ccwWSeXA2f9cTFtUANZA8Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ccwWSeXA2f9cTFtUANZA8Q/span.rust-debug index 124694da75e..bb889636ce8 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/ccwWSeXA2f9cTFtUANZA8Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/ccwWSeXA2f9cTFtUANZA8Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +0.0%; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ccwWSeXA2f9cTFtUANZA8Q/input.css:1:5 + | +1 | a { width: +0.0%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ccwWSeXA2f9cTFtUANZA8Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/span.rust-debug index 6873b5b2cc7..df7dff5a9ce 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: red; color: green; color: red } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/input.css:1:5 + | +1 | a { color: red; color: green; color: red } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/input.css:1:5 | @@ -82,6 +88,12 @@ error: Declaration 1 | a { color: red; color: green; color: red } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/input.css:1:17 + | +1 | a { color: red; color: green; color: red } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/input.css:1:17 | @@ -106,6 +118,12 @@ error: Declaration 1 | a { color: red; color: green; color: red } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/input.css:1:31 + | +1 | a { color: red; color: green; color: red } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/cfNrGQbCQ18L8pQmD7lBZQ/input.css:1:31 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/cxYYDM0_rXbkvaqi8UPWOg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/cxYYDM0_rXbkvaqi8UPWOg/span.rust-debug index 25bc3bf43a0..5061a003525 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/cxYYDM0_rXbkvaqi8UPWOg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/cxYYDM0_rXbkvaqi8UPWOg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbcddd } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/cxYYDM0_rXbkvaqi8UPWOg/input.css:1:5 + | +1 | a { color: #aabbcddd } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/cxYYDM0_rXbkvaqi8UPWOg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/d6iTYxGk5HHi4hIZcn73Bw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/d6iTYxGk5HHi4hIZcn73Bw/span.rust-debug index 5a675bfab22..e36f9341df0 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/d6iTYxGk5HHi4hIZcn73Bw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/d6iTYxGk5HHi4hIZcn73Bw/span.rust-debug @@ -76,6 +76,12 @@ error: Declaration 1 | a:after { content: 'a\ b' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/d6iTYxGk5HHi4hIZcn73Bw/input.css:1:11 + | +1 | a:after { content: 'a\ b' } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/d6iTYxGk5HHi4hIZcn73Bw/input.css:1:11 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/d8Q6MceynW9-IQJ4l0OGzA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/d8Q6MceynW9-IQJ4l0OGzA/span.rust-debug index 4950b76b0b6..697bebe12bd 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/d8Q6MceynW9-IQJ4l0OGzA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/d8Q6MceynW9-IQJ4l0OGzA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: @x\, } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/d8Q6MceynW9-IQJ4l0OGzA/input.css:1:5 + | +1 | a { value: @x\, } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/d8Q6MceynW9-IQJ4l0OGzA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/dCIAD8Ab98J4V9rGaJvZlw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/dCIAD8Ab98J4V9rGaJvZlw/span.rust-debug index 0c9f4cd3e78..aeed5c9775a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/dCIAD8Ab98J4V9rGaJvZlw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/dCIAD8Ab98J4V9rGaJvZlw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: url(\,) } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/dCIAD8Ab98J4V9rGaJvZlw/input.css:1:5 + | +1 | a { value: url(\,) } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/dCIAD8Ab98J4V9rGaJvZlw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/span.rust-debug index adc9da007ad..1209694d773 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: red } a { color: green } a { color: red } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/input.css:1:5 + | +1 | a { color: red } a { color: green } a { color: red } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/input.css:1:5 | @@ -130,6 +136,12 @@ error: Declaration 1 | a { color: red } a { color: green } a { color: red } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/input.css:1:22 + | +1 | a { color: red } a { color: green } a { color: red } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/input.css:1:22 | @@ -202,6 +214,12 @@ error: Declaration 1 | a { color: red } a { color: green } a { color: red } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/input.css:1:41 + | +1 | a { color: red } a { color: green } a { color: red } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/dVUzkh7NtbXySLzWGW0t9g/input.css:1:41 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/eHdhrm6W2iHKQegxH7uEgw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/eHdhrm6W2iHKQegxH7uEgw/span.rust-debug index 66b91f6b8fd..bce5ddc3fe0 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/eHdhrm6W2iHKQegxH7uEgw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/eHdhrm6W2iHKQegxH7uEgw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: .00%; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/eHdhrm6W2iHKQegxH7uEgw/input.css:1:5 + | +1 | a { width: .00%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/eHdhrm6W2iHKQegxH7uEgw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/output.json index 793eb5a284d..a5c86ccad6c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 10, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/span.rust-debug index 578203bb94d..a2f5d20f822 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @\,unknown; | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/input.css:1:2 | 1 | @\,unknown; - | ^^^^^^^^^^ + | ^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/eP2iXsnOY42u7Q_IcchPZA/input.css:1:2 + | +1 | @\,unknown; + | ^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/eVSpM_pYsIvyyewUkjTa2A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/eVSpM_pYsIvyyewUkjTa2A/span.rust-debug index 9582687e68e..810088f979f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/eVSpM_pYsIvyyewUkjTa2A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/eVSpM_pYsIvyyewUkjTa2A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #12223344 } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/eVSpM_pYsIvyyewUkjTa2A/input.css:1:5 + | +1 | a { color: #12223344 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/eVSpM_pYsIvyyewUkjTa2A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/eWp7_8m3btY6p4erQ5c2JQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/eWp7_8m3btY6p4erQ5c2JQ/span.rust-debug index 5973f206fc6..e345ad26124 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/eWp7_8m3btY6p4erQ5c2JQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/eWp7_8m3btY6p4erQ5c2JQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: '\61bc' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/eWp7_8m3btY6p4erQ5c2JQ/input.css:1:5 + | +1 | a { value: '\61bc' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/eWp7_8m3btY6p4erQ5c2JQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/egyt9Hk9xnn2Xfbi3Ckfrg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/egyt9Hk9xnn2Xfbi3Ckfrg/span.rust-debug index d0393d08c58..47760adc47e 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/egyt9Hk9xnn2Xfbi3Ckfrg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/egyt9Hk9xnn2Xfbi3Ckfrg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +.0; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/egyt9Hk9xnn2Xfbi3Ckfrg/input.css:1:5 + | +1 | a { width: +.0; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/egyt9Hk9xnn2Xfbi3Ckfrg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/eivsIn6ub-xYiqErLqd8oA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/eivsIn6ub-xYiqErLqd8oA/span.rust-debug index 7dc30ba7f5c..69e576ca78f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/eivsIn6ub-xYiqErLqd8oA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/eivsIn6ub-xYiqErLqd8oA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #\2cx } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/eivsIn6ub-xYiqErLqd8oA/input.css:1:5 + | +1 | a { value: #\2cx } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/eivsIn6ub-xYiqErLqd8oA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/fTZzFds73kLZoyY9Y2gZdQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/fTZzFds73kLZoyY9Y2gZdQ/span.rust-debug index 165e6d08aae..7b2acd4860f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/fTZzFds73kLZoyY9Y2gZdQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/fTZzFds73kLZoyY9Y2gZdQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #11223345 } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/fTZzFds73kLZoyY9Y2gZdQ/input.css:1:5 + | +1 | a { color: #11223345 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/fTZzFds73kLZoyY9Y2gZdQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/fmt94qCRfRXbpej5kzLZUw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/fmt94qCRfRXbpej5kzLZUw/span.rust-debug index 92dbb5efbf8..69871a809bc 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/fmt94qCRfRXbpej5kzLZUw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/fmt94qCRfRXbpej5kzLZUw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: url(\2c) } | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/fmt94qCRfRXbpej5kzLZUw/input.css:1:5 + | +1 | a { value: url(\2c) } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/fmt94qCRfRXbpej5kzLZUw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ftc5-zf_sliOrFRRBGGS-g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ftc5-zf_sliOrFRRBGGS-g/span.rust-debug index c6c38ab13f6..d50ada21155 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/ftc5-zf_sliOrFRRBGGS-g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/ftc5-zf_sliOrFRRBGGS-g/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #122233ff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ftc5-zf_sliOrFRRBGGS-g/input.css:1:5 + | +1 | a { color: #122233ff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ftc5-zf_sliOrFRRBGGS-g/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/gPpnAqOuxEdLAEJjFaUEkg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/gPpnAqOuxEdLAEJjFaUEkg/span.rust-debug index e78d98f467c..7d8d7bec397 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/gPpnAqOuxEdLAEJjFaUEkg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/gPpnAqOuxEdLAEJjFaUEkg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: url(\61 bc) } | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/gPpnAqOuxEdLAEJjFaUEkg/input.css:1:5 + | +1 | a { value: url(\61 bc) } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/gPpnAqOuxEdLAEJjFaUEkg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/gVzUgfEllenh46I3Psx-uQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/gVzUgfEllenh46I3Psx-uQ/span.rust-debug index eafd6caafb6..a8fa214c832 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/gVzUgfEllenh46I3Psx-uQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/gVzUgfEllenh46I3Psx-uQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { margin: 0 1 0px 1px } | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/gVzUgfEllenh46I3Psx-uQ/input.css:1:5 + | +1 | a { margin: 0 1 0px 1px } + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/gVzUgfEllenh46I3Psx-uQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/gxBoWO36fKxIuYwPzrWyKQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/gxBoWO36fKxIuYwPzrWyKQ/span.rust-debug index e4221d4e8bb..2112e444470 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/gxBoWO36fKxIuYwPzrWyKQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/gxBoWO36fKxIuYwPzrWyKQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: #x\2c } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/gxBoWO36fKxIuYwPzrWyKQ/input.css:1:5 + | +1 | a { value: #x\2c } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/gxBoWO36fKxIuYwPzrWyKQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/inMW5rttJFPDfH0aKVFg_Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/inMW5rttJFPDfH0aKVFg_Q/span.rust-debug index 32453c16529..8e4b3f7748f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/inMW5rttJFPDfH0aKVFg_Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/inMW5rttJFPDfH0aKVFg_Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #11233344 } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/inMW5rttJFPDfH0aKVFg_Q/input.css:1:5 + | +1 | a { color: #11233344 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/inMW5rttJFPDfH0aKVFg_Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/isfWm5W8qb6_aJSz_bdwDw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/isfWm5W8qb6_aJSz_bdwDw/span.rust-debug index 19f9c8f127f..378c5c0485a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/isfWm5W8qb6_aJSz_bdwDw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/isfWm5W8qb6_aJSz_bdwDw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #112233 } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/isfWm5W8qb6_aJSz_bdwDw/input.css:1:5 + | +1 | a { color: #112233 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/isfWm5W8qb6_aJSz_bdwDw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/j9dr5-Ih68VDH1exMwsmZA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/j9dr5-Ih68VDH1exMwsmZA/span.rust-debug index e631752644e..f4bc3123b41 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/j9dr5-Ih68VDH1exMwsmZA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/j9dr5-Ih68VDH1exMwsmZA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabcccff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/j9dr5-Ih68VDH1exMwsmZA/input.css:1:5 + | +1 | a { color: #aabcccff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/j9dr5-Ih68VDH1exMwsmZA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/jD_IvFQVk8LtCrictrWpxw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/jD_IvFQVk8LtCrictrWpxw/span.rust-debug index fdebb051ffc..a0e08e50783 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/jD_IvFQVk8LtCrictrWpxw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/jD_IvFQVk8LtCrictrWpxw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: 0.1; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/jD_IvFQVk8LtCrictrWpxw/input.css:1:5 + | +1 | a { width: 0.1; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/jD_IvFQVk8LtCrictrWpxw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/span.rust-debug index 2b5c94cb9cf..17a677b0c64 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/span.rust-debug @@ -64,6 +64,12 @@ error: Declaration 1 | @keyframes name { from { color: red } to { color: blue } } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/input.css:1:26 + | +1 | @keyframes name { from { color: red } to { color: blue } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/input.css:1:26 | @@ -118,6 +124,12 @@ error: Declaration 1 | @keyframes name { from { color: red } to { color: blue } } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/input.css:1:44 + | +1 | @keyframes name { from { color: red } to { color: blue } } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/jbIIxHeXTPO0PtiubVziHQ/input.css:1:44 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/kVdd5WJZqKSou4cGvcL40g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/kVdd5WJZqKSou4cGvcL40g/span.rust-debug index 185d9b2aaf2..b526acc8d3e 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/kVdd5WJZqKSou4cGvcL40g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/kVdd5WJZqKSou4cGvcL40g/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: \69dent } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/kVdd5WJZqKSou4cGvcL40g/input.css:1:5 + | +1 | a { value: \69dent } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/kVdd5WJZqKSou4cGvcL40g/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/mJEhy0k_dxoszsTVHb3x_Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/mJEhy0k_dxoszsTVHb3x_Q/span.rust-debug index 3875696a32d..e48d348ca59 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/mJEhy0k_dxoszsTVHb3x_Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/mJEhy0k_dxoszsTVHb3x_Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #112233ef } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/mJEhy0k_dxoszsTVHb3x_Q/input.css:1:5 + | +1 | a { color: #112233ef } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/mJEhy0k_dxoszsTVHb3x_Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/mn3ADjaNJuY6IF0Nqms-VQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/mn3ADjaNJuY6IF0Nqms-VQ/span.rust-debug index 7c22d4c05a9..caf066214b4 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/mn3ADjaNJuY6IF0Nqms-VQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/mn3ADjaNJuY6IF0Nqms-VQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: @\2cx } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/mn3ADjaNJuY6IF0Nqms-VQ/input.css:1:5 + | +1 | a { value: @\2cx } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/mn3ADjaNJuY6IF0Nqms-VQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/mx296i8q4HfA0IzZ055Xpw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/mx296i8q4HfA0IzZ055Xpw/span.rust-debug index ceb092016c9..cc45c89e42d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/mx296i8q4HfA0IzZ055Xpw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/mx296i8q4HfA0IzZ055Xpw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: url(\61bc) } | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/mx296i8q4HfA0IzZ055Xpw/input.css:1:5 + | +1 | a { value: url(\61bc) } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/mx296i8q4HfA0IzZ055Xpw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/nTOoTMumkTvMLx_Y_al5RQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/nTOoTMumkTvMLx_Y_al5RQ/span.rust-debug index 5a5cd71381e..f77701b3494 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/nTOoTMumkTvMLx_Y_al5RQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/nTOoTMumkTvMLx_Y_al5RQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: '\,' } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/nTOoTMumkTvMLx_Y_al5RQ/input.css:1:5 + | +1 | a { value: '\,' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/nTOoTMumkTvMLx_Y_al5RQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/niufyVEBI4s-ZqSXdfhptA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/niufyVEBI4s-ZqSXdfhptA/span.rust-debug index dbc6fd30fbf..0f77680c8e1 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/niufyVEBI4s-ZqSXdfhptA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/niufyVEBI4s-ZqSXdfhptA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #abcd } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/niufyVEBI4s-ZqSXdfhptA/input.css:1:5 + | +1 | a { color: #abcd } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/niufyVEBI4s-ZqSXdfhptA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/nlYSjWzJfpf38YhsJNbwmA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/nlYSjWzJfpf38YhsJNbwmA/span.rust-debug index aa12a2410e3..133fc22a456 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/nlYSjWzJfpf38YhsJNbwmA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/nlYSjWzJfpf38YhsJNbwmA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #f00f } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/nlYSjWzJfpf38YhsJNbwmA/input.css:1:5 + | +1 | a { color: #f00f } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/nlYSjWzJfpf38YhsJNbwmA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/oj5Yn0RxnGFEbVphKqrL2Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/oj5Yn0RxnGFEbVphKqrL2Q/span.rust-debug index 814adecd6db..acb20ad6f53 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/oj5Yn0RxnGFEbVphKqrL2Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/oj5Yn0RxnGFEbVphKqrL2Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabcccdd } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/oj5Yn0RxnGFEbVphKqrL2Q/input.css:1:5 + | +1 | a { color: #aabcccdd } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/oj5Yn0RxnGFEbVphKqrL2Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ottVCVON2IlQB3WCD-lu_A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ottVCVON2IlQB3WCD-lu_A/span.rust-debug index 98fabbd63bf807d02726be76f64edd8532b600ca..7534208432e4e60fcd9db1b881c8451aae43232f 100644 GIT binary patch delta 32 ocmZ3&yOD2$8tde_EZiIcMfnA(MJ1IJ1wAL1uo`YwW36KZ0JK{QeE $DIR/tests/fixture/esbuild/misc/pO8ANIJaeZDUsUBCBMKErg/input.css:1:5 + | +1 | a { width: -0.0%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/pO8ANIJaeZDUsUBCBMKErg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/pQWwEpWgxuUS6-uSAJR0nQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/pQWwEpWgxuUS6-uSAJR0nQ/span.rust-debug index 56a54740c18..9a7d8176713 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/pQWwEpWgxuUS6-uSAJR0nQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/pQWwEpWgxuUS6-uSAJR0nQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +.00; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/pQWwEpWgxuUS6-uSAJR0nQ/input.css:1:5 + | +1 | a { width: +.00; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/pQWwEpWgxuUS6-uSAJR0nQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/pTW2Z7kJ0nR_yQzsOsjAwQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/pTW2Z7kJ0nR_yQzsOsjAwQ/span.rust-debug index 131331e09c4..8a31be3c87c 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/pTW2Z7kJ0nR_yQzsOsjAwQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/pTW2Z7kJ0nR_yQzsOsjAwQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #aabbcdff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/pTW2Z7kJ0nR_yQzsOsjAwQ/input.css:1:5 + | +1 | a { color: #aabbcdff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/pTW2Z7kJ0nR_yQzsOsjAwQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ptR_ezJzwIRsP3geOEZI5A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ptR_ezJzwIRsP3geOEZI5A/span.rust-debug index 51c7c27150a..4b7ecd1e814 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/ptR_ezJzwIRsP3geOEZI5A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/ptR_ezJzwIRsP3geOEZI5A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -.0%; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ptR_ezJzwIRsP3geOEZI5A/input.css:1:5 + | +1 | a { width: -.0%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ptR_ezJzwIRsP3geOEZI5A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/qgkE_nOj4HtPukMzEjCY5w/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/qgkE_nOj4HtPukMzEjCY5w/span.rust-debug index 8344d97ec96..b0352906b9f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/qgkE_nOj4HtPukMzEjCY5w/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/qgkE_nOj4HtPukMzEjCY5w/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: '\2c' } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/qgkE_nOj4HtPukMzEjCY5w/input.css:1:5 + | +1 | a { value: '\2c' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/qgkE_nOj4HtPukMzEjCY5w/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/span.rust-debug index 06cd1c3c99f..76dd1c8751f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #AABBCC } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/input.css:1:5 + | +1 | a { color: #AABBCC } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/rAzJtA56igpCO-gN3gRrYw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/rAzJtA56igpCO-gN3gRrYw/span.rust-debug index e93259b3ae1..0429ed0cbd4 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/rAzJtA56igpCO-gN3gRrYw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/rAzJtA56igpCO-gN3gRrYw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 'a\62c' } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/rAzJtA56igpCO-gN3gRrYw/input.css:1:5 + | +1 | a { value: 'a\62c' } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/rAzJtA56igpCO-gN3gRrYw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/rPWYt0NoxD_TvsI8Xrhvyg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/rPWYt0NoxD_TvsI8Xrhvyg/span.rust-debug index 195341216d0..30d4e88b58b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/rPWYt0NoxD_TvsI8Xrhvyg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/rPWYt0NoxD_TvsI8Xrhvyg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: .10%; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/rPWYt0NoxD_TvsI8Xrhvyg/input.css:1:5 + | +1 | a { width: .10%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/rPWYt0NoxD_TvsI8Xrhvyg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/rZIFO-RMBeLmmQK8U6nNmQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/rZIFO-RMBeLmmQK8U6nNmQ/span.rust-debug index 7a9659510c8..bad2dd6d7e4 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/rZIFO-RMBeLmmQK8U6nNmQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/rZIFO-RMBeLmmQK8U6nNmQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #11223444 } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/rZIFO-RMBeLmmQK8U6nNmQ/input.css:1:5 + | +1 | a { color: #11223444 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/rZIFO-RMBeLmmQK8U6nNmQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/sPEO1vW1kIUNhCVdR2d7fg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/sPEO1vW1kIUNhCVdR2d7fg/span.rust-debug index 5fcbe182e5f..7a19207c439 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/sPEO1vW1kIUNhCVdR2d7fg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/sPEO1vW1kIUNhCVdR2d7fg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10x\, } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/sPEO1vW1kIUNhCVdR2d7fg/input.css:1:5 + | +1 | a { value: 10x\, } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/sPEO1vW1kIUNhCVdR2d7fg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/output.json b/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/output.json index c00b88d5e2c..3deb12cc295 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/output.json +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 8, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/span.rust-debug index f4a43c71df0..23a774b57b1 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/span.rust-debug @@ -22,9 +22,15 @@ error: UnknownAtRule 1 | @unknown; | ^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/input.css:1:1 +error: AtRuleName + --> $DIR/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/input.css:1:2 | 1 | @unknown; - | ^^^^^^^^ + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/esbuild/misc/t7nlfNtXN3n8Gh7wpJvmug/input.css:1:2 + | +1 | @unknown; + | ^^^^^^^ diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/tJNGkqEMVKFfOWjyOm5TSg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/tJNGkqEMVKFfOWjyOm5TSg/span.rust-debug index 6d361b380b0..9d4ddd1ddf2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/tJNGkqEMVKFfOWjyOm5TSg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/tJNGkqEMVKFfOWjyOm5TSg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -0.1; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/tJNGkqEMVKFfOWjyOm5TSg/input.css:1:5 + | +1 | a { width: -0.1; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/tJNGkqEMVKFfOWjyOm5TSg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/span.rust-debug index 2381ee7a24c..a7f63a5468f 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/span.rust-debug @@ -88,6 +88,12 @@ error: Declaration 1 | @keyframes name{0%,50%{color:red}25%,75%{color:blue}} | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/input.css:1:24 + | +1 | @keyframes name{0%,50%{color:red}25%,75%{color:blue}} + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/input.css:1:24 | @@ -166,6 +172,12 @@ error: Declaration 1 | @keyframes name{0%,50%{color:red}25%,75%{color:blue}} | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/input.css:1:42 + | +1 | @keyframes name{0%,50%{color:red}25%,75%{color:blue}} + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/uWMeE1AAowARdci8tkE-cg/input.css:1:42 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/ugX8SLCLRvWN-wDCK7ouyA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/ugX8SLCLRvWN-wDCK7ouyA/span.rust-debug index 10348a57af8..e26f0ad94b5 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/ugX8SLCLRvWN-wDCK7ouyA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/ugX8SLCLRvWN-wDCK7ouyA/span.rust-debug @@ -34,6 +34,12 @@ error: Declaration 1 | @-ms-viewport { width: 100vw } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/ugX8SLCLRvWN-wDCK7ouyA/input.css:1:17 + | +1 | @-ms-viewport { width: 100vw } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/ugX8SLCLRvWN-wDCK7ouyA/input.css:1:17 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/uxHrqNkMo_2PTuF8sIRQxA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/uxHrqNkMo_2PTuF8sIRQxA/span.rust-debug index 76d296c5413..19795b13e99 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/uxHrqNkMo_2PTuF8sIRQxA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/uxHrqNkMo_2PTuF8sIRQxA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10\,x } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/uxHrqNkMo_2PTuF8sIRQxA/input.css:1:5 + | +1 | a { value: 10\,x } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/uxHrqNkMo_2PTuF8sIRQxA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/vCiwe_ipn8ReAa4wyU52Ng/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/vCiwe_ipn8ReAa4wyU52Ng/span.rust-debug index c25959fcda9..9500f48569b 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/vCiwe_ipn8ReAa4wyU52Ng/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/vCiwe_ipn8ReAa4wyU52Ng/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: tUrQuOiSe } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/vCiwe_ipn8ReAa4wyU52Ng/input.css:1:5 + | +1 | a { color: tUrQuOiSe } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/vCiwe_ipn8ReAa4wyU52Ng/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/vFNgwFW2EHA0WTOoSWhSTg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/vFNgwFW2EHA0WTOoSWhSTg/span.rust-debug index 8951b7b87eb..360f9f4e59a 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/vFNgwFW2EHA0WTOoSWhSTg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/vFNgwFW2EHA0WTOoSWhSTg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: +.10%; } | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/vFNgwFW2EHA0WTOoSWhSTg/input.css:1:5 + | +1 | a { width: +.10%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/vFNgwFW2EHA0WTOoSWhSTg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/vIco-E1oKlSzuggLOcviNg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/vIco-E1oKlSzuggLOcviNg/span.rust-debug index ab65701b1d8..13fce7913a4 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/vIco-E1oKlSzuggLOcviNg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/vIco-E1oKlSzuggLOcviNg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: 0.0%; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/vIco-E1oKlSzuggLOcviNg/input.css:1:5 + | +1 | a { width: 0.0%; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/vIco-E1oKlSzuggLOcviNg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/vK9rUBJhwa0FsjBe18lL0w/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/vK9rUBJhwa0FsjBe18lL0w/span.rust-debug index 4fd9d7d2a7f..bd4d143766d 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/vK9rUBJhwa0FsjBe18lL0w/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/vK9rUBJhwa0FsjBe18lL0w/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: @k\65yword } | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/vK9rUBJhwa0FsjBe18lL0w/input.css:1:5 + | +1 | a { value: @k\65yword } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/vK9rUBJhwa0FsjBe18lL0w/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/vN7xRB9YekSqanW68eIoNA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/vN7xRB9YekSqanW68eIoNA/span.rust-debug index 77c7b4e1f31..9a0d0bc9c11 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/vN7xRB9YekSqanW68eIoNA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/vN7xRB9YekSqanW68eIoNA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #112233ff } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/vN7xRB9YekSqanW68eIoNA/input.css:1:5 + | +1 | a { color: #112233ff } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/vN7xRB9YekSqanW68eIoNA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/wEB80kxMinK4EZaPb3My1A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/wEB80kxMinK4EZaPb3My1A/span.rust-debug index 8f762d41834..59f2c1312a2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/wEB80kxMinK4EZaPb3My1A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/wEB80kxMinK4EZaPb3My1A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: .00; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/wEB80kxMinK4EZaPb3My1A/input.css:1:5 + | +1 | a { width: .00; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/wEB80kxMinK4EZaPb3My1A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/wwLEw52LUKMFH3Wp5CaBAQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/wwLEw52LUKMFH3Wp5CaBAQ/span.rust-debug index 3ecfb4f6d4d..3706333c210 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/wwLEw52LUKMFH3Wp5CaBAQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/wwLEw52LUKMFH3Wp5CaBAQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: -0.0; } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/wwLEw52LUKMFH3Wp5CaBAQ/input.css:1:5 + | +1 | a { width: -0.0; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/wwLEw52LUKMFH3Wp5CaBAQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/xVWGh0UpWtRUrgqbJEENWA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/xVWGh0UpWtRUrgqbJEENWA/span.rust-debug index 0b8288dee8c..c451245b698 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/xVWGh0UpWtRUrgqbJEENWA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/xVWGh0UpWtRUrgqbJEENWA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: @x\2c } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/xVWGh0UpWtRUrgqbJEENWA/input.css:1:5 + | +1 | a { value: @x\2c } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/xVWGh0UpWtRUrgqbJEENWA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/xVqT8wNU4CEhaDlbLxGyaw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/xVqT8wNU4CEhaDlbLxGyaw/span.rust-debug index c662e100832..33dfea47ad8 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/xVqT8wNU4CEhaDlbLxGyaw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/xVqT8wNU4CEhaDlbLxGyaw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: @\,x } | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/xVqT8wNU4CEhaDlbLxGyaw/input.css:1:5 + | +1 | a { value: @\,x } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/xVqT8wNU4CEhaDlbLxGyaw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/span.rust-debug index 81772e34c9f..c1c3a929539 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #ABBBCCFF } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/input.css:1:5 + | +1 | a { color: #ABBBCCFF } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/xdJ7w6fdV3po3r2aWrgPdA/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/xdJ7w6fdV3po3r2aWrgPdA/span.rust-debug index 8ff5007b348..b7c7333b4b2 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/xdJ7w6fdV3po3r2aWrgPdA/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/xdJ7w6fdV3po3r2aWrgPdA/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #abbbcc } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/xdJ7w6fdV3po3r2aWrgPdA/input.css:1:5 + | +1 | a { color: #abbbcc } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/xdJ7w6fdV3po3r2aWrgPdA/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/yOHW3TOE35U7DAf9Hn7-Ew/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/yOHW3TOE35U7DAf9Hn7-Ew/span.rust-debug index 9e5d899a9dd..bea843fc1f4 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/yOHW3TOE35U7DAf9Hn7-Ew/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/yOHW3TOE35U7DAf9Hn7-Ew/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: \2cx() } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/yOHW3TOE35U7DAf9Hn7-Ew/input.css:1:5 + | +1 | a { value: \2cx() } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/yOHW3TOE35U7DAf9Hn7-Ew/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/yVqdwpiB7OK23Te5mXKdFw/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/yVqdwpiB7OK23Te5mXKdFw/span.rust-debug index 8059ab4962d..74ecfc70ab4 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/yVqdwpiB7OK23Te5mXKdFw/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/yVqdwpiB7OK23Te5mXKdFw/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { width: .0; } | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/yVqdwpiB7OK23Te5mXKdFw/input.css:1:5 + | +1 | a { width: .0; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/yVqdwpiB7OK23Te5mXKdFw/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/yboE7Tr5zjKHy9-m10AZTg/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/yboE7Tr5zjKHy9-m10AZTg/span.rust-debug index 879f2b16656..853820a84bd 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/yboE7Tr5zjKHy9-m10AZTg/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/yboE7Tr5zjKHy9-m10AZTg/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #11223344 } | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/yboE7Tr5zjKHy9-m10AZTg/input.css:1:5 + | +1 | a { color: #11223344 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/yboE7Tr5zjKHy9-m10AZTg/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/zUuWz4A8Y6yZO8JMLAe2fQ/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/zUuWz4A8Y6yZO8JMLAe2fQ/span.rust-debug index bd491e47f26..b4bae713644 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/zUuWz4A8Y6yZO8JMLAe2fQ/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/zUuWz4A8Y6yZO8JMLAe2fQ/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { color: #ff0000 } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/zUuWz4A8Y6yZO8JMLAe2fQ/input.css:1:5 + | +1 | a { color: #ff0000 } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/zUuWz4A8Y6yZO8JMLAe2fQ/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/esbuild/misc/zz_B6vK87VUHpkOMFR_R1g/span.rust-debug b/crates/swc_css_parser/tests/fixture/esbuild/misc/zz_B6vK87VUHpkOMFR_R1g/span.rust-debug index 9182b644c23..ba2fafba7e6 100644 --- a/crates/swc_css_parser/tests/fixture/esbuild/misc/zz_B6vK87VUHpkOMFR_R1g/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/esbuild/misc/zz_B6vK87VUHpkOMFR_R1g/span.rust-debug @@ -58,6 +58,12 @@ error: Declaration 1 | a { value: 10e\32x } | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/esbuild/misc/zz_B6vK87VUHpkOMFR_R1g/input.css:1:5 + | +1 | a { value: 10e\32x } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/esbuild/misc/zz_B6vK87VUHpkOMFR_R1g/input.css:1:5 | diff --git a/crates/swc_css_parser/tests/fixture/function/url/span.rust-debug b/crates/swc_css_parser/tests/fixture/function/url/span.rust-debug index 4fd3a19377a..3128d09b9f4 100644 --- a/crates/swc_css_parser/tests/fixture/function/url/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/function/url/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:2:5 + | +2 | background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:2:5 | @@ -125,6 +131,12 @@ error: Declaration 3 | background-image: url("./image (1).jpg"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:3:5 + | +3 | background-image: url("./image (1).jpg"); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:3:5 | @@ -167,6 +179,12 @@ error: Declaration 4 | background-image: url('./image (1).jpg'); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:4:5 + | +4 | background-image: url('./image (1).jpg'); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:4:5 | @@ -209,6 +227,12 @@ error: Declaration 5 | background-image: URL('./image (1).jpg'); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:5:5 + | +5 | background-image: URL('./image (1).jpg'); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:5:5 | @@ -251,6 +275,12 @@ error: Declaration 6 | background-image: url( './image (1).jpg'); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:6:5 + | +6 | background-image: url( './image (1).jpg'); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:6:5 | @@ -293,6 +323,12 @@ error: Declaration 7 | background-image: url('./image (1).jpg' ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:7:5 + | +7 | background-image: url('./image (1).jpg' ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:7:5 | @@ -335,6 +371,12 @@ error: Declaration 8 | background-image: url( './image (1).jpg' ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:8:5 + | +8 | background-image: url( './image (1).jpg' ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:8:5 | @@ -379,6 +421,12 @@ error: Declaration 11 | | ); | |_____^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:9:5 + | +9 | background-image: url( + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:9:5 | @@ -427,6 +475,12 @@ error: Declaration 12 | background-image: url(); | ^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:12:5 + | +12 | background-image: url(); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:12:5 | @@ -469,6 +523,12 @@ error: Declaration 13 | background-image: url( ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:13:5 + | +13 | background-image: url( ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:13:5 | @@ -511,6 +571,12 @@ error: Declaration 14 | background-image: url(""); | ^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:14:5 + | +14 | background-image: url(""); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:14:5 | @@ -553,6 +619,12 @@ error: Declaration 15 | background-image: url( "" ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:15:5 + | +15 | background-image: url( "" ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:15:5 | @@ -595,6 +667,12 @@ error: Declaration 16 | background-image: url(''); | ^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:16:5 + | +16 | background-image: url(''); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:16:5 | @@ -637,6 +715,12 @@ error: Declaration 17 | background-image: url( '' ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:17:5 + | +17 | background-image: url( '' ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:17:5 | @@ -679,6 +763,12 @@ error: Declaration 18 | background-image: url( ' ' ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:18:5 + | +18 | background-image: url( ' ' ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:18:5 | @@ -721,6 +811,12 @@ error: Declaration 19 | background-image: url(./image.png); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:19:5 + | +19 | background-image: url(./image.png); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:19:5 | @@ -763,6 +859,12 @@ error: Declaration 20 | background-image: url( ./image.png ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:20:5 + | +20 | background-image: url( ./image.png ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:20:5 | @@ -805,6 +907,12 @@ error: Declaration 21 | background-image: url( ./image\32.png ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:21:5 + | +21 | background-image: url( ./image\32.png ); + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:21:5 | @@ -849,6 +957,12 @@ error: Declaration 24 | | ); | |_____^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:22:5 + | +22 | background-image: url( + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:22:5 | @@ -909,6 +1023,12 @@ error: Declaration 33 | | ); | |_____^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:25:5 + | +25 | background-image: url( + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:25:5 | @@ -985,6 +1105,12 @@ error: Declaration 42 | | ); | |________^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:34:5 + | +34 | background-image: url( + | ^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:34:5 | @@ -1055,6 +1181,12 @@ error: Declaration 43 | background: url(image.png\0001); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:43:5 + | +43 | background: url(image.png\0001); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:43:5 | @@ -1097,6 +1229,12 @@ error: Declaration 44 | background: url(image.png\1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:44:5 + | +44 | background: url(image.png\1); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:44:5 | @@ -1139,6 +1277,12 @@ error: Declaration 45 | background: url(image.png\D799); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:45:5 + | +45 | background: url(image.png\D799); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:45:5 | @@ -1181,6 +1325,12 @@ error: Declaration 46 | background: url(image.png\E000); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:46:5 + | +46 | background: url(image.png\E000); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:46:5 | @@ -1223,6 +1373,12 @@ error: Declaration 47 | background: url(image.png\10FFFF); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/function/url/input.css:47:5 + | +47 | background: url(image.png\10FFFF); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/function/url/input.css:47:5 | diff --git a/crates/swc_css_parser/tests/fixture/hex-colors/span.rust-debug b/crates/swc_css_parser/tests/fixture/hex-colors/span.rust-debug index 612b7bdb5e9..80e14ee4a1b 100644 --- a/crates/swc_css_parser/tests/fixture/hex-colors/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/hex-colors/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | color: #000000; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:2:3 + | +2 | color: #000000; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:2:3 | @@ -107,6 +113,12 @@ error: Declaration 3 | color: #ffffff; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:3:3 + | +3 | color: #ffffff; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:3:3 | @@ -131,6 +143,12 @@ error: Declaration 4 | color: #FFFFFF; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:4:3 + | +4 | color: #FFFFFF; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:4:3 | @@ -155,6 +173,12 @@ error: Declaration 5 | color: #0000ffcc; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:5:3 + | +5 | color: #0000ffcc; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:5:3 | @@ -179,6 +203,12 @@ error: Declaration 6 | color: #0000FFCC; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:6:3 + | +6 | color: #0000FFCC; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:6:3 | @@ -203,6 +233,12 @@ error: Declaration 7 | color: #000; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:7:3 + | +7 | color: #000; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:7:3 | @@ -227,6 +263,12 @@ error: Declaration 8 | color: #fff; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:8:3 + | +8 | color: #fff; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:8:3 | @@ -251,6 +293,12 @@ error: Declaration 9 | color: #FFF; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:9:3 + | +9 | color: #FFF; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:9:3 | @@ -275,6 +323,12 @@ error: Declaration 10 | color: #0000; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:10:3 + | +10 | color: #0000; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:10:3 | @@ -299,6 +353,12 @@ error: Declaration 11 | color: #ffff; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:11:3 + | +11 | color: #ffff; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:11:3 | @@ -323,6 +383,12 @@ error: Declaration 12 | color: #FFFF; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/hex-colors/input.css:12:3 + | +12 | color: #FFFF; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/hex-colors/input.css:12:3 | diff --git a/crates/swc_css_parser/tests/fixture/important/basic/span.rust-debug b/crates/swc_css_parser/tests/fixture/important/basic/span.rust-debug index d6e69f1955e..c08bc38628f 100644 --- a/crates/swc_css_parser/tests/fixture/important/basic/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/important/basic/span.rust-debug @@ -89,6 +89,12 @@ error: Declaration 2 | prop: important; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:2:5 + | +2 | prop: important; + | ^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:2:5 | @@ -113,6 +119,12 @@ error: Declaration 3 | color: red important; | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:3:5 + | +3 | color: red important; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:3:5 | @@ -149,6 +161,12 @@ error: Declaration 4 | width: 1px!important; | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:4:5 + | +4 | width: 1px!important; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:4:5 | @@ -185,6 +203,12 @@ error: Declaration 5 | color: red!important; | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:5:5 + | +5 | color: red!important; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:5:5 | @@ -209,6 +233,12 @@ error: Declaration 6 | color: red !important; | ^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:6:5 + | +6 | color: red !important; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:6:5 | @@ -233,6 +263,12 @@ error: Declaration 7 | color: red !important; | ^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:7:5 + | +7 | color: red !important; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:7:5 | @@ -257,6 +293,12 @@ error: Declaration 8 | color: red ! important ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:8:5 + | +8 | color: red ! important ; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:8:5 | @@ -281,6 +323,12 @@ error: Declaration 9 | color: blue !IMPORTANT; | ^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:9:5 + | +9 | color: blue !IMPORTANT; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:9:5 | @@ -305,6 +353,12 @@ error: Declaration 10 | color: white ! IMPORTANT ; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:10:5 + | +10 | color: white ! IMPORTANT ; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:10:5 | @@ -329,6 +383,12 @@ error: Declaration 11 | margin: 10px ! important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:11:5 + | +11 | margin: 10px ! important; + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:11:5 | @@ -365,6 +425,12 @@ error: Declaration 12 | padding: 20px ! /* test */ important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:12:5 + | +12 | padding: 20px ! /* test */ important; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:12:5 | @@ -401,6 +467,12 @@ error: Declaration 13 | width: 100px ! /*! test */ important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:13:5 + | +13 | width: 100px ! /*! test */ important; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:13:5 | @@ -437,6 +509,12 @@ error: Declaration 14 | height: 100px /*! test */ important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:14:5 + | +14 | height: 100px /*! test */ important; + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:14:5 | @@ -485,6 +563,12 @@ error: Declaration 15 | z-index: 1 ""! important; | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:15:5 + | +15 | z-index: 1 ""! important; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:15:5 | @@ -521,6 +605,12 @@ error: Declaration 16 | padding: 1px/* sep */!important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/important/basic/input.css:16:5 + | +16 | padding: 1px/* sep */!important; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/important/basic/input.css:16:5 | diff --git a/crates/swc_css_parser/tests/fixture/number/span.rust-debug b/crates/swc_css_parser/tests/fixture/number/span.rust-debug index e3ff11169de..5dee520288c 100644 --- a/crates/swc_css_parser/tests/fixture/number/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/number/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | property: 10; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:2:5 + | +2 | property: 10; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:2:5 | @@ -107,6 +113,12 @@ error: Declaration 3 | property: +10; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:3:5 + | +3 | property: +10; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:3:5 | @@ -131,6 +143,12 @@ error: Declaration 4 | property: -10; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:4:5 + | +4 | property: -10; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:4:5 | @@ -155,6 +173,12 @@ error: Declaration 5 | property: 0.1; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:5:5 + | +5 | property: 0.1; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:5:5 | @@ -179,6 +203,12 @@ error: Declaration 6 | property: +0.1; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:6:5 + | +6 | property: +0.1; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:6:5 | @@ -203,6 +233,12 @@ error: Declaration 7 | property: -0.1; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:7:5 + | +7 | property: -0.1; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:7:5 | @@ -227,6 +263,12 @@ error: Declaration 8 | property: -.1; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:8:5 + | +8 | property: -.1; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:8:5 | @@ -251,6 +293,12 @@ error: Declaration 9 | property: +.1; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:9:5 + | +9 | property: +.1; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:9:5 | @@ -275,6 +323,12 @@ error: Declaration 10 | property: 0; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:10:5 + | +10 | property: 0; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:10:5 | @@ -299,6 +353,12 @@ error: Declaration 11 | property: 10; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:11:5 + | +11 | property: 10; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:11:5 | @@ -323,6 +383,12 @@ error: Declaration 12 | property: .10; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:12:5 + | +12 | property: .10; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:12:5 | @@ -347,6 +413,12 @@ error: Declaration 13 | property: 12.34; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:13:5 + | +13 | property: 12.34; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:13:5 | @@ -371,6 +443,12 @@ error: Declaration 14 | property: 0.1; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:14:5 + | +14 | property: 0.1; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:14:5 | @@ -395,6 +473,12 @@ error: Declaration 15 | property: 1.0; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:15:5 + | +15 | property: 1.0; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:15:5 | @@ -419,6 +503,12 @@ error: Declaration 16 | property: 0.0; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:16:5 + | +16 | property: 0.0; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:16:5 | @@ -443,6 +533,12 @@ error: Declaration 17 | property: +0.0; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:17:5 + | +17 | property: +0.0; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:17:5 | @@ -467,6 +563,12 @@ error: Declaration 18 | property: -0.0; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:18:5 + | +18 | property: -0.0; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:18:5 | @@ -491,6 +593,12 @@ error: Declaration 19 | property: .0; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:19:5 + | +19 | property: .0; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:19:5 | @@ -515,6 +623,12 @@ error: Declaration 20 | property: 1.200000; | ^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:20:5 + | +20 | property: 1.200000; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:20:5 | @@ -539,6 +653,12 @@ error: Declaration 21 | property: 1.2e2; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:21:5 + | +21 | property: 1.2e2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:21:5 | @@ -563,6 +683,12 @@ error: Declaration 22 | property: 1e2; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:22:5 + | +22 | property: 1e2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:22:5 | @@ -587,6 +713,12 @@ error: Declaration 23 | property: .2e2; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:23:5 + | +23 | property: .2e2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:23:5 | @@ -611,6 +743,12 @@ error: Declaration 24 | property: 1.2E2; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:24:5 + | +24 | property: 1.2E2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:24:5 | @@ -635,6 +773,12 @@ error: Declaration 25 | property: 1.2e+2; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:25:5 + | +25 | property: 1.2e+2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:25:5 | @@ -659,6 +803,12 @@ error: Declaration 26 | property: 1.2e-2; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:26:5 + | +26 | property: 1.2e-2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:26:5 | @@ -683,6 +833,12 @@ error: Declaration 27 | property: -1; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:27:5 + | +27 | property: -1; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:27:5 | @@ -707,6 +863,12 @@ error: Declaration 28 | property: -1.2; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:28:5 + | +28 | property: -1.2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:28:5 | @@ -731,6 +893,12 @@ error: Declaration 29 | property: -.2; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:29:5 + | +29 | property: -.2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:29:5 | @@ -755,6 +923,12 @@ error: Declaration 30 | property: -.2; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:30:5 + | +30 | property: -.2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:30:5 | @@ -779,6 +953,12 @@ error: Declaration 31 | property: +.2; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:31:5 + | +31 | property: +.2; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:31:5 | @@ -803,6 +983,12 @@ error: Declaration 32 | property: -1.2e3; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:32:5 + | +32 | property: -1.2e3; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:32:5 | @@ -827,6 +1013,12 @@ error: Declaration 33 | property: 1.75; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:33:5 + | +33 | property: 1.75; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:33:5 | @@ -851,6 +1043,12 @@ error: Declaration 34 | property: +1.75; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:34:5 + | +34 | property: +1.75; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:34:5 | @@ -875,6 +1073,12 @@ error: Declaration 35 | property: 1e; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/number/input.css:35:5 + | +35 | property: 1e; + | ^^^^^^^^ + error: Ident --> $DIR/tests/fixture/number/input.css:35:5 | diff --git a/crates/swc_css_parser/tests/fixture/property/escaped/span.rust-debug b/crates/swc_css_parser/tests/fixture/property/escaped/span.rust-debug index de0c9c0549d..c67052ede9f 100644 --- a/crates/swc_css_parser/tests/fixture/property/escaped/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/property/escaped/span.rust-debug @@ -67,6 +67,12 @@ error: Declaration 2 | colo\r: \red; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/property/escaped/input.css:2:5 + | +2 | colo\r: \red; + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/property/escaped/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/rome/at-page/page-margin-properties/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/at-page/page-margin-properties/span.rust-debug index 7512f7d4d94..31d71490803 100644 --- a/crates/swc_css_parser/tests/fixture/rome/at-page/page-margin-properties/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/at-page/page-margin-properties/span.rust-debug @@ -125,6 +125,12 @@ error: Declaration 3 | display: none; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/page-margin-properties/input.css:3:3 + | +3 | display: none; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/page-margin-properties/input.css:3:3 | diff --git a/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties-case-insensitive/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties-case-insensitive/span.rust-debug index 0fc405bc38b..59a81f479c1 100644 --- a/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties-case-insensitive/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties-case-insensitive/span.rust-debug @@ -51,6 +51,12 @@ error: Declaration 2 | DISPLAY: none; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/page-properties-case-insensitive/input.css:2:2 + | +2 | DISPLAY: none; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/page-properties-case-insensitive/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties/span.rust-debug index 68cdca39ffe..f248432d823 100644 --- a/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/at-page/page-properties/span.rust-debug @@ -51,6 +51,12 @@ error: Declaration 2 | display: none; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/page-properties/input.css:2:2 + | +2 | display: none; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/page-properties/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/at-page/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/at-page/span.rust-debug index c562d9c6214..bc9b826358e 100644 --- a/crates/swc_css_parser/tests/fixture/rome/at-page/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/at-page/span.rust-debug @@ -131,6 +131,12 @@ error: Declaration 2 | @top-center { content: none } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:2:16 + | +2 | @top-center { content: none } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:2:16 | @@ -161,6 +167,12 @@ error: Declaration 3 | margin-left: 4cm; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:3:2 + | +3 | margin-left: 4cm; + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:3:2 | @@ -306,6 +318,12 @@ error: Declaration 7 | @top-center { content: none } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:7:16 + | +7 | @top-center { content: none } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:7:16 | @@ -336,6 +354,12 @@ error: Declaration 8 | margin-left: 4cm; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:8:2 + | +8 | margin-left: 4cm; + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:8:2 | @@ -469,6 +493,12 @@ error: Declaration 12 | @top-center { content: none } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:12:16 + | +12 | @top-center { content: none } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:12:16 | @@ -499,6 +529,12 @@ error: Declaration 13 | margin-left: 4cm; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:13:2 + | +13 | margin-left: 4cm; + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:13:2 | @@ -632,6 +668,12 @@ error: Declaration 17 | @top-center { CONTENT: none } | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:17:16 + | +17 | @top-center { CONTENT: none } + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:17:16 | @@ -662,6 +704,12 @@ error: Declaration 18 | MARGIN-LEFT: 4cm; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/at-page/input.css:18:2 + | +18 | MARGIN-LEFT: 4cm; + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/at-page/input.css:18:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/calc/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/calc/span.rust-debug index e5563922e64..0762d9d422f 100644 --- a/crates/swc_css_parser/tests/fixture/rome/calc/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/calc/span.rust-debug @@ -89,6 +89,12 @@ error: Declaration 2 | width: calc(2px); | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:2:2 + | +2 | width: calc(2px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:2:2 | @@ -143,6 +149,12 @@ error: Declaration 3 | width: calc(2px + 1px); | ^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:3:2 + | +3 | width: calc(2px + 1px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:3:2 | @@ -233,6 +245,12 @@ error: Declaration 4 | width: calc(2em + 1%); | ^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:4:2 + | +4 | width: calc(2em + 1%); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:4:2 | @@ -317,6 +335,12 @@ error: Declaration 5 | width: calc(2em * 2% * 3px); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:5:2 + | +5 | width: calc(2em * 2% * 3px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:5:2 | @@ -449,6 +473,12 @@ error: Declaration 6 | width: calc(2em / 2 / 3); | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:6:2 + | +6 | width: calc(2em / 2 / 3); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:6:2 | @@ -563,6 +593,12 @@ error: Declaration 7 | width: calc(2em / (2 - 3) / (2 - 6)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:7:2 + | +7 | width: calc(2em / (2 - 3) / (2 - 6)); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:7:2 | @@ -749,6 +785,12 @@ error: Declaration 8 | width: calc(2em * 2 + 3); | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:8:2 + | +8 | width: calc(2em * 2 + 3); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:8:2 | @@ -863,6 +905,12 @@ error: Declaration 9 | width: calc(2em * 2 - 3 + 3em / 5); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/calc/input.css:9:2 + | +9 | width: calc(2em * 2 - 3 + 3em / 5); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/calc/input.css:9:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/comment/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/comment/span.rust-debug index f7af3a5dccf..a9c4853bfdc 100644 --- a/crates/swc_css_parser/tests/fixture/rome/comment/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/comment/span.rust-debug @@ -72,6 +72,12 @@ error: Declaration 6 | color: white; /* comment */ | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/comment/input.css:6:2 + | +6 | color: white; /* comment */ + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/comment/input.css:6:2 | @@ -151,6 +157,12 @@ error: Declaration 10 | color: /* comment */ white; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/comment/input.css:10:2 + | +10 | color: /* comment */ white; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/comment/input.css:10:2 | @@ -230,6 +242,12 @@ error: Declaration 14 | color: white; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/comment/input.css:14:2 + | +14 | color: white; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/comment/input.css:14:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json b/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json index 4c255d6cf1b..462f1883c2d 100644 --- a/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json +++ b/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json @@ -79,7 +79,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 10, "end": 15, @@ -135,7 +135,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 25, "end": 37, @@ -191,7 +191,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 47, "end": 54, @@ -247,7 +247,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 66, "end": 72, @@ -304,7 +304,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 81, "end": 93, @@ -360,7 +360,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 101, "end": 109, @@ -417,7 +417,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 116, "end": 124, @@ -476,7 +476,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 133, "end": 139, @@ -535,7 +535,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 148, "end": 158, @@ -599,7 +599,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 168, "end": 185, @@ -684,7 +684,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 200, "end": 213, @@ -755,7 +755,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 221, "end": 229, @@ -826,7 +826,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 237, "end": 247, @@ -897,7 +897,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 255, "end": 275, @@ -953,7 +953,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 287, "end": 305, @@ -1009,7 +1009,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 316, "end": 342, @@ -1093,7 +1093,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 357, "end": 381, @@ -1177,7 +1177,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 395, "end": 413, @@ -1228,7 +1228,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 422, "end": 440, @@ -1279,7 +1279,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 448, "end": 467, @@ -1346,7 +1346,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 478, "end": 497, diff --git a/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug index 35b9bdcf8c6..8bef1c6bfb4 100644 --- a/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug @@ -89,7 +89,13 @@ error: Declaration 2 | --foo: 'bar'; | ^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:2:2 + | +2 | --foo: 'bar'; + | ^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:2:2 | 2 | --foo: 'bar'; @@ -125,7 +131,13 @@ error: Declaration 3 | --lore-ipsum: "foo"; | ^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:3:2 + | +3 | --lore-ipsum: "foo"; + | ^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:3:2 | 3 | --lore-ipsum: "foo"; @@ -161,7 +173,13 @@ error: Declaration 4 | --FANCY: "abort"; | ^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:4:2 + | +4 | --FANCY: "abort"; + | ^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:4:2 | 4 | --FANCY: "abort"; @@ -197,7 +215,13 @@ error: Declaration 5 | --test: 1987; | ^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:5:2 + | +5 | --test: 1987; + | ^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:5:2 | 5 | --test: 1987; @@ -233,7 +257,13 @@ error: Declaration 6 | --percentage: 25%; | ^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:6:2 + | +6 | --percentage: 25%; + | ^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:6:2 | 6 | --percentage: 25%; @@ -269,7 +299,13 @@ error: Declaration 7 | --number: 37; | ^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:7:2 + | +7 | --number: 37; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:7:2 | 7 | --number: 37; @@ -305,7 +341,13 @@ error: Declaration 8 | --length: 12em; | ^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:8:2 + | +8 | --length: 12em; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:8:2 | 8 | --length: 12em; @@ -341,7 +383,13 @@ error: Declaration 9 | --time: 75ms; | ^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:9:2 + | +9 | --time: 75ms; + | ^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:9:2 | 9 | --time: 75ms; @@ -377,7 +425,13 @@ error: Declaration 10 | --function: foo(); | ^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:10:2 + | +10 | --function: foo(); + | ^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:10:2 | 10 | --function: foo(); @@ -419,7 +473,13 @@ error: Declaration 11 | --nested-function: foo(bar()); | ^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:11:2 + | +11 | --nested-function: foo(bar()); + | ^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:11:2 | 11 | --nested-function: foo(bar()); @@ -473,7 +533,13 @@ error: Declaration 12 | --parentheses: ( ); | ^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:12:2 + | +12 | --parentheses: ( ); + | ^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:12:2 | 12 | --parentheses: ( ); @@ -521,7 +587,13 @@ error: Declaration 13 | --braces: { }; | ^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:13:2 + | +13 | --braces: { }; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:13:2 | 13 | --braces: { }; @@ -569,7 +641,13 @@ error: Declaration 14 | --brackets: [ ]; | ^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:14:2 + | +14 | --brackets: [ ]; + | ^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:14:2 | 14 | --brackets: [ ]; @@ -617,7 +695,13 @@ error: Declaration 15 | --at-keyword-unknown: @foobar; | ^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:15:2 + | +15 | --at-keyword-unknown: @foobar; + | ^^^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:15:2 | 15 | --at-keyword-unknown: @foobar; @@ -653,7 +737,13 @@ error: Declaration 16 | --at-keyword-known: @media; | ^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:16:2 + | +16 | --at-keyword-known: @media; + | ^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:16:2 | 16 | --at-keyword-known: @media; @@ -689,7 +779,13 @@ error: Declaration 17 | --at-keyword-unknown-block: @foobar {}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:17:2 + | +17 | --at-keyword-unknown-block: @foobar {}; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:17:2 | 17 | --at-keyword-unknown-block: @foobar {}; @@ -743,7 +839,13 @@ error: Declaration 18 | --at-keyword-known-block: @media {}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:18:2 + | +18 | --at-keyword-known-block: @media {}; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:18:2 | 18 | --at-keyword-known-block: @media {}; @@ -797,7 +899,13 @@ error: Declaration 19 | --cdo-at-top-level: $DIR/tests/fixture/rome/custom-properties/input.css:19:2 + | +19 | --cdo-at-top-level: $DIR/tests/fixture/rome/custom-properties/input.css:19:2 | 19 | --cdo-at-top-level: ; | ^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:20:2 + | +20 | --cdc-at-top-level: -->; + | ^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:20:2 | 20 | --cdc-at-top-level: -->; @@ -869,7 +983,13 @@ error: Declaration 21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:2 + | +21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:2 | 21 | --cdo-not-top-level: (); | ^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/custom-properties/input.css:22:2 + | +22 | --cdc-not-top-level: (-->); + | ^^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/custom-properties/input.css:22:2 | 22 | --cdc-not-top-level: (-->); diff --git a/crates/swc_css_parser/tests/fixture/rome/fit-content/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/fit-content/span.rust-debug index 65eb1bb1bf3..231e59eec19 100644 --- a/crates/swc_css_parser/tests/fixture/rome/fit-content/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/fit-content/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | grid-template-columns: fit-content(8ch) fit-content(8ch) 1fr; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/fit-content/input.css:2:2 + | +2 | grid-template-columns: fit-content(8ch) fit-content(8ch) 1fr; + | ^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/fit-content/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/font/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/font/span.rust-debug index 60c4346914e..f2919c56b4f 100644 --- a/crates/swc_css_parser/tests/fixture/rome/font/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/font/span.rust-debug @@ -45,6 +45,12 @@ error: Declaration 2 | src: url(""); | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/font/input.css:2:2 + | +2 | src: url(""); + | ^^^ + error: Ident --> $DIR/tests/fixture/rome/font/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/functions/output.json b/crates/swc_css_parser/tests/fixture/rome/functions/output.json index a3b043a8a40..367fd3fc005 100644 --- a/crates/swc_css_parser/tests/fixture/rome/functions/output.json +++ b/crates/swc_css_parser/tests/fixture/rome/functions/output.json @@ -79,7 +79,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 10, "end": 17, @@ -167,7 +167,7 @@ }, "value": [ { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 37, "end": 44, diff --git a/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug index 3b3e2eee9ff..c4ba3393e69 100644 --- a/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug @@ -89,7 +89,13 @@ error: Declaration 2 | --fancy: 2px; | ^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/rome/functions/input.css:2:2 + | +2 | --fancy: 2px; + | ^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/rome/functions/input.css:2:2 | 2 | --fancy: 2px; @@ -125,6 +131,12 @@ error: Declaration 3 | border: var(--fancy); | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/functions/input.css:3:2 + | +3 | border: var(--fancy); + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/functions/input.css:3:2 | @@ -155,7 +167,7 @@ error: Value 3 | border: var(--fancy); | ^^^^^^^ -error: Ident +error: DashedIdent --> $DIR/tests/fixture/rome/functions/input.css:3:14 | 3 | border: var(--fancy); @@ -167,6 +179,12 @@ error: Declaration 4 | font-size: calc(10px + 5rem); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/functions/input.css:4:2 + | +4 | font-size: calc(10px + 5rem); + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/functions/input.css:4:2 | @@ -257,6 +275,12 @@ error: Declaration 5 | background: url(""); | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/functions/input.css:5:2 + | +5 | background: url(""); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/functions/input.css:5:2 | @@ -299,6 +323,12 @@ error: Declaration 6 | background: url("something"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/functions/input.css:6:2 + | +6 | background: url("something"); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/functions/input.css:6:2 | @@ -341,6 +371,12 @@ error: Declaration 7 | background: url("./something"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/functions/input.css:7:2 + | +7 | background: url("./something"); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/functions/input.css:7:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/grid/minmax/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/grid/minmax/span.rust-debug index 1e0866b48b9..fcbe455d1a1 100644 --- a/crates/swc_css_parser/tests/fixture/rome/grid/minmax/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/grid/minmax/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | grid-template-columns: minmax(min-content, 300px) minmax(200px, 1fr) minmax(max-content, max-content); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/grid/minmax/input.css:2:2 + | +2 | grid-template-columns: minmax(min-content, 300px) minmax(200px, 1fr) minmax(max-content, max-content); + | ^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/grid/minmax/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/fit-content/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/fit-content/span.rust-debug index 846a17ae03c..5c1ebd7c11d 100644 --- a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/fit-content/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/fit-content/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | grid-template-columns: repeat(4, fit-content(300px)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/grid/repeat/fit-content/input.css:2:2 + | +2 | grid-template-columns: repeat(4, fit-content(300px)); + | ^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/grid/repeat/fit-content/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/flex/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/flex/span.rust-debug index 50b491af0fb..84fe68a32d8 100644 --- a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/flex/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/flex/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | grid-template-columns: repeat(4, 1fr); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/grid/repeat/flex/input.css:2:2 + | +2 | grid-template-columns: repeat(4, 1fr); + | ^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/grid/repeat/flex/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/line-name/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/line-name/span.rust-debug index 5a2d90dbfe1..03d98179324 100644 --- a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/line-name/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/line-name/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | grid-template-columns: repeat(4, [col-start]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/grid/repeat/line-name/input.css:2:2 + | +2 | grid-template-columns: repeat(4, [col-start]); + | ^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/grid/repeat/line-name/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/minmax/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/minmax/span.rust-debug index fad8f3c8b34..32c96c98831 100644 --- a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/minmax/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/minmax/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | grid-template-columns: repeat(4, minmax(min-content, 300px)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/grid/repeat/minmax/input.css:2:2 + | +2 | grid-template-columns: repeat(4, minmax(min-content, 300px)); + | ^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/grid/repeat/minmax/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/multi-values/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/multi-values/span.rust-debug index c25abc6bcea..0b842fbbc89 100644 --- a/crates/swc_css_parser/tests/fixture/rome/grid/repeat/multi-values/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/grid/repeat/multi-values/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | grid-template-columns: repeat(4, [col-start] min-content [col-middle] max-content [col-end]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/grid/repeat/multi-values/input.css:2:2 + | +2 | grid-template-columns: repeat(4, [col-start] min-content [col-middle] max-content [col-end]); + | ^^^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/grid/repeat/multi-values/input.css:2:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/keyframe/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/keyframe/span.rust-debug index 16bbc7b4959..69dc894cb76 100644 --- a/crates/swc_css_parser/tests/fixture/rome/keyframe/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/keyframe/span.rust-debug @@ -96,6 +96,12 @@ error: Declaration 3 | margin-top: 50px !important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/keyframe/input.css:3:9 + | +3 | margin-top: 50px !important; + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/keyframe/input.css:3:9 | @@ -170,6 +176,12 @@ error: Declaration 6 | margin-top: 100px !important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/keyframe/input.css:6:9 + | +6 | margin-top: 100px !important; + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/keyframe/input.css:6:9 | diff --git a/crates/swc_css_parser/tests/fixture/rome/min-and-max/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/min-and-max/span.rust-debug index 4b69c1f2a28..294947ce7b3 100644 --- a/crates/swc_css_parser/tests/fixture/rome/min-and-max/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/min-and-max/span.rust-debug @@ -89,6 +89,12 @@ error: Declaration 2 | width: max(500px); | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:2:2 + | +2 | width: max(500px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:2:2 | @@ -143,6 +149,12 @@ error: Declaration 3 | width: max(500px, 6 / 4); | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:3:2 + | +3 | width: max(500px, 6 / 4); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:3:2 | @@ -233,6 +245,12 @@ error: Declaration 4 | width: max(500px, 40px + 5%); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:4:2 + | +4 | width: max(500px, 40px + 5%); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:4:2 | @@ -341,6 +359,12 @@ error: Declaration 5 | width: max(500px, 5% * 400px + 2px); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:5:2 + | +5 | width: max(500px, 5% * 400px + 2px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:5:2 | @@ -497,6 +521,12 @@ error: Declaration 6 | width: max(500px, 5% * 400px + 2px, 5% * 400px + 2px, 5% * 400px + 2px); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:6:2 + | +6 | width: max(500px, 5% * 400px + 2px, 5% * 400px + 2px, 5% * 400px + 2px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:6:2 | @@ -857,6 +887,12 @@ error: Declaration 7 | width: min(500px); | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:7:2 + | +7 | width: min(500px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:7:2 | @@ -911,6 +947,12 @@ error: Declaration 8 | width: min(500px, 6 / 4); | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:8:2 + | +8 | width: min(500px, 6 / 4); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:8:2 | @@ -1001,6 +1043,12 @@ error: Declaration 9 | width: min(500px, 40px + 5%); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:9:2 + | +9 | width: min(500px, 40px + 5%); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:9:2 | @@ -1109,6 +1157,12 @@ error: Declaration 10 | width: min(500px, 5% * 400px + 2px); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:10:2 + | +10 | width: min(500px, 5% * 400px + 2px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:10:2 | @@ -1265,6 +1319,12 @@ error: Declaration 11 | width: min(500px, 5% * 400px + 2px, 5% * 400px + 2px, 5% * 400px + 2px); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/min-and-max/input.css:11:2 + | +11 | width: min(500px, 5% * 400px + 2px, 5% * 400px + 2px, 5% * 400px + 2px); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/min-and-max/input.css:11:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/selectors/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/selectors/span.rust-debug index 8fbd1b2af77..767ed51f8fe 100644 --- a/crates/swc_css_parser/tests/fixture/rome/selectors/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/selectors/span.rust-debug @@ -452,6 +452,12 @@ error: Declaration 14 | color: purple; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/selectors/input.css:14:3 + | +14 | color: purple; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/selectors/input.css:14:3 | @@ -555,6 +561,12 @@ error: Declaration 18 | color: purple; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/selectors/input.css:18:3 + | +18 | color: purple; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/selectors/input.css:18:3 | @@ -658,6 +670,12 @@ error: Declaration 22 | color: purple; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/selectors/input.css:22:3 + | +22 | color: purple; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/selectors/input.css:22:3 | @@ -785,6 +803,12 @@ error: Declaration 26 | color: purple; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/selectors/input.css:26:2 + | +26 | color: purple; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/selectors/input.css:26:2 | diff --git a/crates/swc_css_parser/tests/fixture/rome/smoke/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/smoke/span.rust-debug index ebdcd90f98e..3475a7a6d0c 100644 --- a/crates/swc_css_parser/tests/fixture/rome/smoke/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/smoke/span.rust-debug @@ -75,6 +75,12 @@ error: Declaration 3 | background: red; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/smoke/input.css:3:5 + | +3 | background: red; + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/smoke/input.css:3:5 | @@ -99,6 +105,12 @@ error: Declaration 4 | width: calc(1px + 2%); | ^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/smoke/input.css:4:5 + | +4 | width: calc(1px + 2%); + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/smoke/input.css:4:5 | diff --git a/crates/swc_css_parser/tests/fixture/rome/supports/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/supports/span.rust-debug index a8c0f219620..da5374ed962 100644 --- a/crates/swc_css_parser/tests/fixture/rome/supports/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/supports/span.rust-debug @@ -67,6 +67,12 @@ error: Declaration 1 | @supports not (display: flex) { | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:1:16 + | +1 | @supports not (display: flex) { + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:1:16 | @@ -146,6 +152,12 @@ error: Declaration 4 | @supports ( box-shadow: 0 0 2px black inset ) or | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:4:13 + | +4 | @supports ( box-shadow: 0 0 2px black inset ) or + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:4:13 | @@ -258,6 +270,12 @@ error: Declaration 5 | ( -moz-box-shadow: 0 0 2px black inset ) or | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:5:13 + | +5 | ( -moz-box-shadow: 0 0 2px black inset ) or + | ^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:5:13 | @@ -370,6 +388,12 @@ error: Declaration 6 | ( -webkit-box-shadow: 0 0 2px black inset ) or | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:6:13 + | +6 | ( -webkit-box-shadow: 0 0 2px black inset ) or + | ^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:6:13 | @@ -482,6 +506,12 @@ error: Declaration 7 | ( -o-box-shadow: 0 0 2px black inset ) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:7:13 + | +7 | ( -o-box-shadow: 0 0 2px black inset ) {} + | ^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:7:13 | @@ -641,6 +671,12 @@ error: Declaration 10 | @supports ((transition-property: color) or | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:10:13 + | +10 | @supports ((transition-property: color) or + | ^^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:10:13 | @@ -693,6 +729,12 @@ error: Declaration 11 | (animation-name: foo)) and | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:11:13 + | +11 | (animation-name: foo)) and + | ^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:11:13 | @@ -745,6 +787,12 @@ error: Declaration 12 | (transform: rotate(10deg)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/supports/input.css:12:12 + | +12 | (transform: rotate(10deg)) {} + | ^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/supports/input.css:12:12 | diff --git a/crates/swc_css_parser/tests/fixture/rome/values/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/values/span.rust-debug index 677b82d4afe..2af3ff1768a 100644 --- a/crates/swc_css_parser/tests/fixture/rome/values/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/values/span.rust-debug @@ -89,6 +89,12 @@ error: Declaration 2 | content: ' content '; | ^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:2:2 + | +2 | content: ' content '; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:2:2 | @@ -183,6 +189,12 @@ error: Declaration 6 | opacity: 1e-3; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:6:2 + | +6 | opacity: 1e-3; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:6:2 | @@ -207,6 +219,12 @@ error: Declaration 7 | line-height: 0.2; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:7:2 + | +7 | line-height: 0.2; + | ^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:7:2 | @@ -231,6 +249,12 @@ error: Declaration 8 | width: 20%; | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:8:2 + | +8 | width: 20%; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:8:2 | @@ -261,6 +285,12 @@ error: Declaration 9 | margin-top: -5%; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:9:2 + | +9 | margin-top: -5%; + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:9:2 | @@ -346,6 +376,12 @@ error: Declaration 13 | color: yellow | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:13:2 + | +13 | color: yellow + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:13:2 | @@ -428,6 +464,12 @@ error: Declaration 17 | color: yellow; | ^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:17:2 + | +17 | color: yellow; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:17:2 | @@ -452,6 +494,12 @@ error: Declaration 18 | background: none | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/rome/values/input.css:18:2 + | +18 | background: none + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/rome/values/input.css:18:2 | diff --git a/crates/swc_css_parser/tests/fixture/selector/nesting/span.rust-debug b/crates/swc_css_parser/tests/fixture/selector/nesting/span.rust-debug index 31be052727b..af1ce9b7a23 100644 --- a/crates/swc_css_parser/tests/fixture/selector/nesting/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/selector/nesting/span.rust-debug @@ -82,6 +82,12 @@ error: Declaration 1 | & > .bar { color: red; } | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/selector/nesting/input.css:1:12 + | +1 | & > .bar { color: red; } + | ^^^^^ + error: Ident --> $DIR/tests/fixture/selector/nesting/input.css:1:12 | diff --git a/crates/swc_css_parser/tests/fixture/selector/universal/span.rust-debug b/crates/swc_css_parser/tests/fixture/selector/universal/span.rust-debug index def905b043d..1025ae9882d 100644 --- a/crates/swc_css_parser/tests/fixture/selector/universal/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/selector/universal/span.rust-debug @@ -67,6 +67,12 @@ error: Declaration 2 | display: block; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/selector/universal/input.css:2:5 + | +2 | display: block; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/selector/universal/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/1/span.rust-debug b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/1/span.rust-debug index a2d5cc3b944..ceb266f489b 100644 --- a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/1/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/1/span.rust-debug @@ -115,6 +115,12 @@ error: Declaration 2 | color: red; | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/styled-jsx/selector/1/input.css:2:5 + | +2 | color: red; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/styled-jsx/selector/1/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug index 27849ab1858..5b62e7d9c54 100644 --- a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug @@ -139,6 +139,12 @@ error: Declaration 2 | color: green; | ^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/styled-jsx/selector/2/input.css:2:5 + | +2 | color: green; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/styled-jsx/selector/2/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/stylis/comma/01/span.rust-debug b/crates/swc_css_parser/tests/fixture/stylis/comma/01/span.rust-debug index 447c197e5af..6bc28bd626f 100644 --- a/crates/swc_css_parser/tests/fixture/stylis/comma/01/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/stylis/comma/01/span.rust-debug @@ -67,6 +67,12 @@ error: Declaration 2 | cursor: image-set(url(foo.jpg) 2x), pointer; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/stylis/comma/01/input.css:2:5 + | +2 | cursor: image-set(url(foo.jpg) 2x), pointer; + | ^^^^^^ + error: Ident --> $DIR/tests/fixture/stylis/comma/01/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/value/custom-property/output.json b/crates/swc_css_parser/tests/fixture/value/custom-property/output.json index b3d6070564a..c724d3c0fa8 100644 --- a/crates/swc_css_parser/tests/fixture/value/custom-property/output.json +++ b/crates/swc_css_parser/tests/fixture/value/custom-property/output.json @@ -80,7 +80,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 12, "end": 14, @@ -124,7 +124,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 27, "end": 38, @@ -172,7 +172,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 60, "end": 72, @@ -232,7 +232,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 95, "end": 107, @@ -304,7 +304,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 131, "end": 143, @@ -364,7 +364,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 166, "end": 178, @@ -446,7 +446,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 204, "end": 211, @@ -489,7 +489,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 219, "end": 227, @@ -532,7 +532,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 239, "end": 247, @@ -579,7 +579,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 265, "end": 273, @@ -626,7 +626,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 295, "end": 303, @@ -669,7 +669,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 326, "end": 341, @@ -713,7 +713,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 353, "end": 361, @@ -770,7 +770,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 370, "end": 376, @@ -829,7 +829,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 389, "end": 396, @@ -886,7 +886,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 409, "end": 419, @@ -1014,7 +1014,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 438, "end": 448, @@ -1091,7 +1091,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 468, "end": 476, @@ -1147,7 +1147,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 506, "end": 514, @@ -1203,7 +1203,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 545, "end": 559, @@ -1344,7 +1344,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 576, "end": 591, @@ -1403,7 +1403,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 601, "end": 616, @@ -1450,7 +1450,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 625, "end": 638, @@ -1591,7 +1591,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 655, "end": 669, @@ -1650,7 +1650,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 679, "end": 693, @@ -1697,7 +1697,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 702, "end": 717, @@ -1838,7 +1838,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 734, "end": 750, @@ -1897,7 +1897,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 760, "end": 776, @@ -1944,7 +1944,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 787, "end": 793, @@ -2220,7 +2220,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 834, "end": 846, @@ -2408,7 +2408,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 891, "end": 896, @@ -2459,7 +2459,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 908, "end": 913, @@ -2510,7 +2510,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 925, "end": 943, @@ -2781,7 +2781,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 980, "end": 996, @@ -2853,7 +2853,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 1015, "end": 1040, @@ -2920,7 +2920,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 1051, "end": 1072, @@ -3060,7 +3060,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 1088, "end": 1091, @@ -3174,7 +3174,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 1102, "end": 1107, @@ -3286,7 +3286,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 1123, "end": 1128, diff --git a/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug b/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug index 01cff43ba05..1d16ff7abe8 100644 --- a/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug @@ -89,7 +89,13 @@ error: Declaration 2 | --:value; | ^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:2:5 + | +2 | --:value; + | ^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:2:5 | 2 | --:value; @@ -119,7 +125,13 @@ error: Declaration 4 | --important:value!important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:4:5 + | +4 | --important:value!important; + | ^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:4:5 | 4 | --important:value!important; @@ -149,7 +161,13 @@ error: Declaration 5 | --important1: value!important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:5:5 + | +5 | --important1: value!important; + | ^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:5:5 | 5 | --important1: value!important; @@ -185,7 +203,13 @@ error: Declaration 6 | --important2: value !important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:6:5 + | +6 | --important2: value !important; + | ^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:6:5 | 6 | --important2: value !important; @@ -227,7 +251,13 @@ error: Declaration 7 | --important3:value !important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:7:5 + | +7 | --important3:value !important; + | ^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:7:5 | 7 | --important3:value !important; @@ -263,7 +293,13 @@ error: Declaration 8 | --important4: calc(1)!important; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:8:5 + | +8 | --important4: calc(1)!important; + | ^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:8:5 | 8 | --important4: calc(1)!important; @@ -311,7 +347,13 @@ error: Declaration 10 | --empty: ; | ^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:10:5 + | +10 | --empty: ; + | ^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:10:5 | 10 | --empty: ; @@ -341,7 +383,13 @@ error: Declaration 11 | --empty2: /**/; | ^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:11:5 + | +11 | --empty2: /**/; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:11:5 | 11 | --empty2: /**/; @@ -371,7 +419,13 @@ error: Declaration 12 | --empty3: !important; | ^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:12:5 + | +12 | --empty3: !important; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:12:5 | 12 | --empty3: !important; @@ -401,7 +455,13 @@ error: Declaration 13 | --empty4:/**/ !important; | ^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:13:5 + | +13 | --empty4:/**/ !important; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:13:5 | 13 | --empty4:/**/ !important; @@ -431,7 +491,13 @@ error: Declaration 14 | --empty5:/* 1 */ /* 2 */; | ^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:14:5 + | +14 | --empty5:/* 1 */ /* 2 */; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:14:5 | 14 | --empty5:/* 1 */ /* 2 */; @@ -461,7 +527,13 @@ error: Declaration 16 | --no-whitespace:ident; | ^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:16:5 + | +16 | --no-whitespace:ident; + | ^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:16:5 | 16 | --no-whitespace:ident; @@ -491,7 +563,13 @@ error: Declaration 17 | --number: 1; | ^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:17:5 + | +17 | --number: 1; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:17:5 | 17 | --number: 1; @@ -527,7 +605,13 @@ error: Declaration 18 | --unit: 100vw; | ^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:18:5 + | +18 | --unit: 100vw; + | ^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:18:5 | 18 | --unit: 100vw; @@ -563,7 +647,13 @@ error: Declaration 19 | --color: #06c; | ^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:19:5 + | +19 | --color: #06c; + | ^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:19:5 | 19 | --color: #06c; @@ -599,7 +689,13 @@ error: Declaration 21 | --function: calc(1 + 1); | ^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:21:5 + | +21 | --function: calc(1 + 1); + | ^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:21:5 | 21 | --function: calc(1 + 1); @@ -671,7 +767,13 @@ error: Declaration 22 | --variable: var(--unit); | ^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:22:5 + | +22 | --variable: var(--unit); + | ^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:22:5 | 22 | --variable: var(--unit); @@ -719,7 +821,13 @@ error: Declaration 24 | --string: 'single quoted string'; | ^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:24:5 + | +24 | --string: 'single quoted string'; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:24:5 | 24 | --string: 'single quoted string'; @@ -755,7 +863,13 @@ error: Declaration 25 | --string: "double quoted string"; | ^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:25:5 + | +25 | --string: "double quoted string"; + | ^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:25:5 | 25 | --string: "double quoted string"; @@ -791,7 +905,13 @@ error: Declaration 27 | --square-block: [1, 2, 3]; | ^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:27:5 + | +27 | --square-block: [1, 2, 3]; + | ^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:27:5 | 27 | --square-block: [1, 2, 3]; @@ -875,7 +995,13 @@ error: Declaration 28 | --square-block1: []; | ^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:28:5 + | +28 | --square-block1: []; + | ^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:28:5 | 28 | --square-block1: []; @@ -917,7 +1043,13 @@ error: Declaration 29 | --square-block2:[]; | ^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:29:5 + | +29 | --square-block2:[]; + | ^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:29:5 | 29 | --square-block2:[]; @@ -953,7 +1085,13 @@ error: Declaration 30 | --round-block: (1, 2, 3); | ^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:30:5 + | +30 | --round-block: (1, 2, 3); + | ^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:30:5 | 30 | --round-block: (1, 2, 3); @@ -1037,7 +1175,13 @@ error: Declaration 31 | --round-block1: (); | ^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:31:5 + | +31 | --round-block1: (); + | ^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:31:5 | 31 | --round-block1: (); @@ -1079,7 +1223,13 @@ error: Declaration 32 | --round-block2:(); | ^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:32:5 + | +32 | --round-block2:(); + | ^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:32:5 | 32 | --round-block2:(); @@ -1115,7 +1265,13 @@ error: Declaration 33 | --bracket-block: {1, 2, 3}; | ^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:33:5 + | +33 | --bracket-block: {1, 2, 3}; + | ^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:33:5 | 33 | --bracket-block: {1, 2, 3}; @@ -1199,7 +1355,13 @@ error: Declaration 34 | --bracket-block1: {}; | ^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:34:5 + | +34 | --bracket-block1: {}; + | ^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:34:5 | 34 | --bracket-block1: {}; @@ -1241,7 +1403,13 @@ error: Declaration 35 | --bracket-block2:{}; | ^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:35:5 + | +35 | --bracket-block2:{}; + | ^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:35:5 | 35 | --bracket-block2:{}; @@ -1277,7 +1445,13 @@ error: Declaration 38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; | ^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:38:5 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:38:5 | 38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; @@ -1445,7 +1619,13 @@ error: Declaration 39 | --javascript: function(rule) { console.log(rule) }; | ^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:39:5 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:39:5 | 39 | --javascript: function(rule) { console.log(rule) }; @@ -1553,7 +1733,13 @@ error: Declaration 41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:41:5 + | +41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:41:5 | 41 | --CDO: ; | ^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:42:5 + | +42 | --CDC: -->; + | ^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:42:5 | 42 | --CDC: -->; @@ -1625,7 +1817,13 @@ error: Declaration 44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); | ^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:44:5 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:44:5 | 44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); @@ -1829,7 +2027,13 @@ error: Declaration 45 | --fake-important:{!important}; | ^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:45:5 + | +45 | --fake-important:{!important}; + | ^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:45:5 | 45 | --fake-important:{!important}; @@ -1877,7 +2081,13 @@ error: Declaration 46 | --semicolon-not-top-level: (;); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:46:5 + | +46 | --semicolon-not-top-level: (;); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:46:5 | 46 | --semicolon-not-top-level: (;); @@ -1925,7 +2135,13 @@ error: Declaration 47 | --delim-not-top-level: (!); | ^^^^^^^^^^^^^^^^^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:47:5 + | +47 | --delim-not-top-level: (!); + | ^^^^^^^^^^^^^^^^^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:47:5 | 47 | --delim-not-top-level: (!); @@ -2027,7 +2243,13 @@ error: Declaration 50 | :root{--a:1} | ^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:50:7 + | +50 | :root{--a:1} + | ^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:50:7 | 50 | :root{--a:1} @@ -2111,7 +2333,13 @@ error: Declaration 51 | :root {--foo: } | ^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:51:8 + | +51 | :root {--foo: } + | ^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:51:8 | 51 | :root {--foo: } @@ -2203,7 +2431,13 @@ error: Declaration 54 | | } | |_ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/custom-property/input.css:53:5 + | +53 | --foo: + | ^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/custom-property/input.css:53:5 | 53 | --foo: diff --git a/crates/swc_css_parser/tests/fixture/value/escaped/span.rust-debug b/crates/swc_css_parser/tests/fixture/value/escaped/span.rust-debug index 158da090bca..3c6faec83a6 100644 --- a/crates/swc_css_parser/tests/fixture/value/escaped/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/value/escaped/span.rust-debug @@ -67,6 +67,12 @@ error: Declaration 2 | color: \red; | ^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/escaped/input.css:2:5 + | +2 | color: \red; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/value/escaped/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/value/quotes/span.rust-debug b/crates/swc_css_parser/tests/fixture/value/quotes/span.rust-debug index a7ea550d089..4ccc2d87c58 100644 --- a/crates/swc_css_parser/tests/fixture/value/quotes/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/value/quotes/span.rust-debug @@ -101,6 +101,12 @@ error: Declaration 2 | content: "This string is demarcated by double quotes."; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:2:5 + | +2 | content: "This string is demarcated by double quotes."; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:2:5 | @@ -125,6 +131,12 @@ error: Declaration 3 | content: 'This string is demarcated by single quotes.'; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:3:5 + | +3 | content: 'This string is demarcated by single quotes.'; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:3:5 | @@ -149,6 +161,12 @@ error: Declaration 4 | content: "This is a string with \" an escaped double quote."; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:4:5 + | +4 | content: "This is a string with \" an escaped double quote."; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:4:5 | @@ -173,6 +191,12 @@ error: Declaration 5 | content: "This string also has \22 an escaped double quote."; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:5:5 + | +5 | content: "This string also has \22 an escaped double quote."; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:5:5 | @@ -197,6 +221,12 @@ error: Declaration 6 | content: 'This is a string with \' an escaped single quote.'; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:6:5 + | +6 | content: 'This is a string with \' an escaped single quote.'; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:6:5 | @@ -221,6 +251,12 @@ error: Declaration 7 | content: 'This string also has \27 an escaped single quote.'; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:7:5 + | +7 | content: 'This string also has \27 an escaped single quote.'; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:7:5 | @@ -245,6 +281,12 @@ error: Declaration 8 | content: "This is a string with \\ an escaped backslash."; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:8:5 + | +8 | content: "This is a string with \\ an escaped backslash."; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:8:5 | @@ -269,6 +311,12 @@ error: Declaration 9 | content: "This string also has \22an escaped double quote."; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:9:5 + | +9 | content: "This string also has \22an escaped double quote."; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:9:5 | @@ -293,6 +341,12 @@ error: Declaration 10 | content: "This string also has \22 an escaped double quote."; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:10:5 + | +10 | content: "This string also has \22 an escaped double quote."; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:10:5 | @@ -317,6 +371,12 @@ error: Declaration 11 | content: "This string has a \Aline break in it."; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:11:5 + | +11 | content: "This string has a \Aline break in it."; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:11:5 | @@ -342,6 +402,12 @@ error: Declaration 13 | | awesome string"; | |_______________^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:12:5 + | +12 | content: "A really long \ + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:12:5 | @@ -370,6 +436,12 @@ error: Declaration 14 | content: ";'@ /**/\""; | ^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:14:5 + | +14 | content: ";'@ /**/\""; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:14:5 | @@ -394,6 +466,12 @@ error: Declaration 15 | content: '\'"\\'; | ^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:15:5 + | +15 | content: '\'"\\'; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:15:5 | @@ -419,6 +497,12 @@ error: Declaration 17 | | b"; | |__^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:16:5 + | +16 | content: "a\ + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:16:5 | @@ -448,6 +532,12 @@ error: Declaration 19 | | b"; | |__^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:18:5 + | +18 | content: "a\ + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:18:5 | @@ -477,6 +567,12 @@ error: Declaration 21 | | b"; | |__^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:20:5 + | +20 | content: "a\ + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:20:5 | @@ -505,6 +601,12 @@ error: Declaration 22 | content: "a\ b"; | ^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:22:5 + | +22 | content: "a\ b"; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:22:5 | @@ -533,6 +635,12 @@ error: Declaration 27 | | b"; | |__^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:23:5 + | +23 | content: "a\ + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:23:5 | @@ -567,6 +675,12 @@ error: Declaration 28 | content: 'a\62 c'; | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:28:5 + | +28 | content: 'a\62 c'; + | ^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:28:5 | @@ -681,6 +795,12 @@ error: Declaration 33 | color: red; | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:33:5 + | +33 | color: red; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:33:5 | @@ -784,6 +904,12 @@ error: Declaration 36 | color: red; | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/quotes/input.css:36:5 + | +36 | color: red; + | ^^^^^ + error: Ident --> $DIR/tests/fixture/value/quotes/input.css:36:5 | diff --git a/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug b/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug index 703c844e7d5..4103ba58ced 100644 --- a/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | prop: []; | ^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/square-brackets/input.css:2:5 + | +2 | prop: []; + | ^^^^ + error: Ident --> $DIR/tests/fixture/value/square-brackets/input.css:2:5 | @@ -107,6 +113,12 @@ error: Declaration 3 | prop: [ ]; | ^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/square-brackets/input.css:3:5 + | +3 | prop: [ ]; + | ^^^^ + error: Ident --> $DIR/tests/fixture/value/square-brackets/input.css:3:5 | @@ -131,6 +143,12 @@ error: Declaration 4 | prop: [row1-start]; | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/square-brackets/input.css:4:5 + | +4 | prop: [row1-start]; + | ^^^^ + error: Ident --> $DIR/tests/fixture/value/square-brackets/input.css:4:5 | @@ -167,6 +185,12 @@ error: Declaration 5 | prop: [ row1-start-with-spaces-around ]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/square-brackets/input.css:5:5 + | +5 | prop: [ row1-start-with-spaces-around ]; + | ^^^^ + error: Ident --> $DIR/tests/fixture/value/square-brackets/input.css:5:5 | @@ -203,6 +227,12 @@ error: Declaration 6 | prop: [red #fff 12px]; | ^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/square-brackets/input.css:6:5 + | +6 | prop: [red #fff 12px]; + | ^^^^ + error: Ident --> $DIR/tests/fixture/value/square-brackets/input.css:6:5 | @@ -275,6 +305,12 @@ error: Declaration 7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/square-brackets/input.css:7:5 + | +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; + | ^^^^ + error: Ident --> $DIR/tests/fixture/value/square-brackets/input.css:7:5 | diff --git a/crates/swc_css_parser/tests/fixture/value/url/output.json b/crates/swc_css_parser/tests/fixture/value/url/output.json index 64c8d05b7e9..739c1ad808e 100644 --- a/crates/swc_css_parser/tests/fixture/value/url/output.json +++ b/crates/swc_css_parser/tests/fixture/value/url/output.json @@ -765,7 +765,7 @@ }, "values": [ { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 712, "end": 719, @@ -793,7 +793,7 @@ }, "value": [ { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 724, "end": 739, @@ -971,7 +971,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 823, "end": 828, @@ -1175,7 +1175,7 @@ }, "value": [ { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 1011, "end": 1016, diff --git a/crates/swc_css_parser/tests/fixture/value/url/span.rust-debug b/crates/swc_css_parser/tests/fixture/value/url/span.rust-debug index 8df065fc1c7..751ebabc147 100644 --- a/crates/swc_css_parser/tests/fixture/value/url/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/value/url/span.rust-debug @@ -83,6 +83,12 @@ error: Declaration 2 | background: url(https://example.com/image.png); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:2:5 + | +2 | background: url(https://example.com/image.png); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:2:5 | @@ -125,6 +131,12 @@ error: Declaration 3 | background: URL(https://example.com/image.png); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:3:5 + | +3 | background: URL(https://example.com/image.png); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:3:5 | @@ -167,6 +179,12 @@ error: Declaration 4 | background: \URL(https://example.com/image.png); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:4:5 + | +4 | background: \URL(https://example.com/image.png); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:4:5 | @@ -209,6 +227,12 @@ error: Declaration 5 | background: url("https://example.com/image.png"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:5:5 + | +5 | background: url("https://example.com/image.png"); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:5:5 | @@ -251,6 +275,12 @@ error: Declaration 6 | background: url('https://example.com/image.png'); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:6:5 + | +6 | background: url('https://example.com/image.png'); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:6:5 | @@ -293,6 +323,12 @@ error: Declaration 7 | background: URL('https://example.com/image.png'); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:7:5 + | +7 | background: URL('https://example.com/image.png'); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:7:5 | @@ -335,6 +371,12 @@ error: Declaration 8 | background: \URL('https://example.com/image.png'); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:8:5 + | +8 | background: \URL('https://example.com/image.png'); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:8:5 | @@ -377,6 +419,12 @@ error: Declaration 9 | background: url(data:image/png;base64,iRxVB0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:9:5 + | +9 | background: url(data:image/png;base64,iRxVB0); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:9:5 | @@ -419,6 +467,12 @@ error: Declaration 10 | background: url(#IDofSVGpath); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:10:5 + | +10 | background: url(#IDofSVGpath); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:10:5 | @@ -461,6 +515,12 @@ error: Declaration 13 | background: url("//aa.com/img.svg" prefetch); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:13:5 + | +13 | background: url("//aa.com/img.svg" prefetch); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:13:5 | @@ -515,6 +575,12 @@ error: Declaration 14 | background: url("//aa.com/img.svg" foo bar baz func(test)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:14:5 + | +14 | background: url("//aa.com/img.svg" foo bar baz func(test)); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:14:5 | @@ -623,6 +689,12 @@ error: Declaration 15 | background: url("http://example.com/image.svg" param(--color var(--primary-color))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:15:5 + | +15 | background: url("http://example.com/image.svg" param(--color var(--primary-color))); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:15:5 | @@ -695,7 +767,7 @@ error: Value 15 | background: url("http://example.com/image.svg" param(--color var(--primary-color))); | ^^^^^^^ -error: Ident +error: DashedIdent --> $DIR/tests/fixture/value/url/input.css:15:58 | 15 | background: url("http://example.com/image.svg" param(--color var(--primary-color))); @@ -725,7 +797,7 @@ error: Value 15 | background: url("http://example.com/image.svg" param(--color var(--primary-color))); | ^^^^^^^^^^^^^^^ -error: Ident +error: DashedIdent --> $DIR/tests/fixture/value/url/input.css:15:70 | 15 | background: url("http://example.com/image.svg" param(--color var(--primary-color))); @@ -737,6 +809,12 @@ error: Declaration 17 | background: url(); | ^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:17:5 + | +17 | background: url(); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:17:5 | @@ -779,6 +857,12 @@ error: Declaration 18 | background: url(""); | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:18:5 + | +18 | background: url(""); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:18:5 | @@ -821,6 +905,12 @@ error: Declaration 19 | background: url(''); | ^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:19:5 + | +19 | background: url(''); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:19:5 | @@ -863,7 +953,13 @@ error: Declaration 21 | --foo: "http://www.example.com/pinkish.gif"; | ^^^^^^^ -error: Ident +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:21:5 + | +21 | --foo: "http://www.example.com/pinkish.gif"; + | ^^^^^ + +error: DashedIdent --> $DIR/tests/fixture/value/url/input.css:21:5 | 21 | --foo: "http://www.example.com/pinkish.gif"; @@ -899,6 +995,12 @@ error: Declaration 23 | background: src("http://www.example.com/pinkish.gif"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:23:5 + | +23 | background: src("http://www.example.com/pinkish.gif"); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:23:5 | @@ -941,6 +1043,12 @@ error: Declaration 24 | background: SRC("http://www.example.com/pinkish.gif"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:24:5 + | +24 | background: SRC("http://www.example.com/pinkish.gif"); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:24:5 | @@ -983,6 +1091,12 @@ error: Declaration 25 | background: src(var(--foo)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/value/url/input.css:25:5 + | +25 | background: src(var(--foo)); + | ^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/value/url/input.css:25:5 | @@ -1031,7 +1145,7 @@ error: Value 25 | background: src(var(--foo)); | ^^^^^ -error: Ident +error: DashedIdent --> $DIR/tests/fixture/value/url/input.css:25:25 | 25 | background: src(var(--foo)); diff --git a/crates/swc_css_parser/tests/fixture/vercel/001/span.rust-debug b/crates/swc_css_parser/tests/fixture/vercel/001/span.rust-debug index ab961bd1d7a..d8f706401d1 100644 --- a/crates/swc_css_parser/tests/fixture/vercel/001/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/vercel/001/span.rust-debug @@ -85,6 +85,12 @@ error: Declaration 2 | margin-right: 0; | ^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/vercel/001/input.css:2:5 + | +2 | margin-right: 0; + | ^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/vercel/001/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/fixture/vercel/002/span.rust-debug b/crates/swc_css_parser/tests/fixture/vercel/002/span.rust-debug index 62148836fb3..c81169bf20c 100644 --- a/crates/swc_css_parser/tests/fixture/vercel/002/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/vercel/002/span.rust-debug @@ -73,6 +73,12 @@ error: Declaration 2 | -webkit-mask-image: -webkit-radial-gradient(circle, white, black); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: DeclarationProperty + --> $DIR/tests/fixture/vercel/002/input.css:2:5 + | +2 | -webkit-mask-image: -webkit-radial-gradient(circle, white, black); + | ^^^^^^^^^^^^^^^^^^ + error: Ident --> $DIR/tests/fixture/vercel/002/input.css:2:5 | diff --git a/crates/swc_css_parser/tests/recovery/at-rule/import/empty/output.json b/crates/swc_css_parser/tests/recovery/at-rule/import/empty/output.json index 173177c65f5..2f5f4a90dcf 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/import/empty/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/import/empty/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 8, + "start": 1, + "end": 7, "ctxt": 0 }, "value": "import", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/import/indent/output.json b/crates/swc_css_parser/tests/recovery/at-rule/import/indent/output.json index 8f4c6a99ba9..c78cfa79ddf 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/import/indent/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/import/indent/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 8, + "start": 1, + "end": 7, "ctxt": 0 }, "value": "import", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/import/no-semi/output.json b/crates/swc_css_parser/tests/recovery/at-rule/import/no-semi/output.json index 41bfe44a6f2..3984ae4f915 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/import/no-semi/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/import/no-semi/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 23, + "start": 1, + "end": 7, "ctxt": 0 }, "value": "import", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-1/output.json b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-1/output.json index 3f4d46922cf..d8dcb288881 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-1/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-1/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 15, + "start": 1, + "end": 10, "ctxt": 0 }, "value": "keyframes", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-2/output.json b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-2/output.json index 750e7462fea..9449bb349cd 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-2/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-2/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 18, + "start": 1, + "end": 10, "ctxt": 0 }, "value": "keyframes", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-3/output.json b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-3/output.json index 651c624ce34..76f9edbd12b 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-3/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-3/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 16, + "start": 1, + "end": 10, "ctxt": 0 }, "value": "keyframes", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-4/output.json b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-4/output.json index b9523b24966..3fa262eb9d3 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-4/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident-4/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 18, + "start": 1, + "end": 10, "ctxt": 0 }, "value": "keyframes", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident/output.json b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident/output.json index 1bb20210603..b4fb069fc4a 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/custom-ident/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 18, + "start": 1, + "end": 10, "ctxt": 0 }, "value": "keyframes", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/empty-name/output.json b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/empty-name/output.json index dedf121b2b8..fe58ae18b8d 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/empty-name/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/empty-name/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 11, + "start": 1, + "end": 10, "ctxt": 0 }, "value": "keyframes", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/keyframe-number/output.json b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/keyframe-number/output.json index 67a79e83a23..94a74474754 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/keyframes/keyframe-number/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/keyframes/keyframe-number/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 18, + "start": 1, + "end": 10, "ctxt": 0 }, "value": "keyframes", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/layer/block/output.json b/crates/swc_css_parser/tests/recovery/at-rule/layer/block/output.json index 2dab80560c7..6e30f7918f5 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/layer/block/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/layer/block/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 40, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "layer", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/layer/empty/output.json b/crates/swc_css_parser/tests/recovery/at-rule/layer/empty/output.json index 3268633bf08..e91037c1263 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/layer/empty/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/layer/empty/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 7, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "layer", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-block/output.json b/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-block/output.json index 359b2085168..46088c2300b 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-block/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-block/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 7, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "layer", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-statement/output.json b/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-statement/output.json index a2bca204fdf..00622592aec 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-statement/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/layer/string-name-statement/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 7, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "layer", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/condition-1/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/condition-1/output.json index 39a68e9b8b1..f16f9a70ee5 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/condition-1/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/condition-1/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 40, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/condition-and-or/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/condition-and-or/output.json index f3e45cc1b43..67c24df802b 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/condition-and-or/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/condition-and-or/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 37, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/condition/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/condition/output.json index bfa4ee96cf1..7195f109b1b 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/condition/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/condition/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 22, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-1/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-1/output.json index d7b2891bde8..fe01789ec54 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-1/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-1/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 14, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-2/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-2/output.json index 0ef58c1c44e..ef81ae9873b 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-2/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name-2/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 8, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name/output.json index f6a9ecf9932..1c7e2700ff0 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-name/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 8, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-1/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-1/output.json index 5dbb0fc65a4..45e5378315b 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-1/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-1/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 16, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-2/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-2/output.json index 7d50ccdb366..500f2509431 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-2/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-2/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 16, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-3/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-3/output.json index b86a492fb52..e259674c4e9 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-3/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-3/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 16, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-4/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-4/output.json index fad1f526155..3eee4e3651c 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-4/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-4/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 24, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-5/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-5/output.json index 34d85ad7215..3d65dcc13ce 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-5/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-5/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 32, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-6/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-6/output.json index d04ff657344..a3f5ee2d04f 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-6/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range-6/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 32, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range/output.json index f69ee57b14d..79c38000bda 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature-range/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 15, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/feature/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/feature/output.json index a751983e77b..2c00e18a247 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/feature/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/feature/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 18, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/media/ratio/output.json b/crates/swc_css_parser/tests/recovery/at-rule/media/ratio/output.json index d4b278cf58b..ef0bd8a9388 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/media/ratio/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/media/ratio/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 25, + "start": 1, + "end": 6, "ctxt": 0 }, "value": "media", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/supports/no-parens/output.json b/crates/swc_css_parser/tests/recovery/at-rule/supports/no-parens/output.json index f91098ca6db..eda105d13ee 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/supports/no-parens/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/supports/no-parens/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 10, + "start": 1, + "end": 9, "ctxt": 0 }, "value": "supports", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/supports/wrong-or-and/output.json b/crates/swc_css_parser/tests/recovery/at-rule/supports/wrong-or-and/output.json index ca13cfbfd97..4f231606941 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/supports/wrong-or-and/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/supports/wrong-or-and/output.json @@ -16,8 +16,8 @@ "name": { "type": "Identifier", "span": { - "start": 0, - "end": 64, + "start": 1, + "end": 9, "ctxt": 0 }, "value": "supports", diff --git a/crates/swc_css_parser/tests/recovery/at-rule/unknown/output.json b/crates/swc_css_parser/tests/recovery/at-rule/unknown/output.json index 991372db9d5..b001b762c43 100644 --- a/crates/swc_css_parser/tests/recovery/at-rule/unknown/output.json +++ b/crates/swc_css_parser/tests/recovery/at-rule/unknown/output.json @@ -16,7 +16,7 @@ "name": { "type": "Identifier", "span": { - "start": 0, + "start": 1, "end": 17, "ctxt": 0 }, diff --git a/crates/swc_css_parser/tests/recovery/value/url/output.json b/crates/swc_css_parser/tests/recovery/value/url/output.json index 120189f4ec6..f0f871be6ca 100644 --- a/crates/swc_css_parser/tests/recovery/value/url/output.json +++ b/crates/swc_css_parser/tests/recovery/value/url/output.json @@ -78,7 +78,7 @@ "ctxt": 0 }, "property": { - "type": "Identifier", + "type": "DashedIdentifier", "span": { "start": 10, "end": 15, diff --git a/crates/swc_css_visit/src/lib.rs b/crates/swc_css_visit/src/lib.rs index 88d00af1ce3..f4df5e21b10 100644 --- a/crates/swc_css_visit/src/lib.rs +++ b/crates/swc_css_visit/src/lib.rs @@ -39,6 +39,12 @@ define!({ pub raw: JsWord, } + pub struct DashedIdent { + pub span: Span, + pub value: JsWord, + pub raw: JsWord, + } + pub struct Str { pub span: Span, pub value: JsWord, @@ -51,9 +57,14 @@ define!({ pub raw: JsWord, } + pub enum DeclarationProperty { + Ident(Ident), + DashedIdent(DashedIdent), + } + pub struct Declaration { pub span: Span, - pub property: Ident, + pub property: DeclarationProperty, pub value: Vec, pub important: Option, } @@ -96,6 +107,8 @@ define!({ Ident(Ident), + DashedIdent(DashedIdent), + Str(Str), Function(Function), @@ -339,6 +352,7 @@ define!({ Namespace(NamespaceRule), Viewport(ViewportRule), Document(DocumentRule), + ColorProfile(ColorProfileRule), Unknown(UnknownAtRule), } @@ -391,9 +405,14 @@ define!({ pub block: Block, } + pub enum AtRuleName { + DashedIdent(DashedIdent), + Ident(Ident), + } + pub struct UnknownAtRule { pub span: Span, - pub name: Ident, + pub name: AtRuleName, pub prelude: Vec, pub block: Option, } @@ -634,4 +653,15 @@ define!({ pub enum SupportsFeature { Declaration(Declaration), } + + pub enum ColorProfileName { + DashedIdent(DashedIdent), + Ident(Ident), + } + + pub struct ColorProfileRule { + pub span: Span, + pub name: ColorProfileName, + pub block: Vec, + } }); diff --git a/crates/swc_stylis/src/prefixer.rs b/crates/swc_stylis/src/prefixer.rs index f902255b295..0e854fb2ad5 100644 --- a/crates/swc_stylis/src/prefixer.rs +++ b/crates/swc_stylis/src/prefixer.rs @@ -51,11 +51,11 @@ impl Prefixer { self.added.push(Declaration { span: DUMMY_SP, - property: Ident { + property: DeclarationProperty::Ident(Ident { span: DUMMY_SP, value: "cursor".into(), raw: "cursor".into(), - }, + }), value: { let val = Value::Comma(CommaValues { span: DUMMY_SP, @@ -96,13 +96,14 @@ impl VisitMut for Prefixer { value: $val.into(), raw: $val.into(), }); + let property = DeclarationProperty::Ident(Ident { + span: DUMMY_SP, + value: $property.into(), + raw: $property.into(), + }); self.added.push(Declaration { span: n.span, - property: Ident { - span: n.property.span, - value: $property.into(), - raw: $property.into(), - }, + property, value: vec![val], important: n.important.clone(), }); @@ -111,13 +112,15 @@ impl VisitMut for Prefixer { macro_rules! same_content { ($property:expr) => {{ + let property = DeclarationProperty::Ident(Ident { + span: DUMMY_SP, + value: $property.into(), + raw: $property.into(), + }); + self.added.push(Declaration { span: n.span, - property: Ident { - span: n.property.span, - value: $property.into(), - raw: $property.into(), - }, + property, value: n.value.clone(), important: n.important.clone(), }); @@ -141,7 +144,23 @@ impl VisitMut for Prefixer { }}; } - match &*n.property.value { + let is_dashed_ident = match n.property { + DeclarationProperty::Ident(_) => false, + DeclarationProperty::DashedIdent(_) => true, + }; + + if is_dashed_ident { + return; + } + + let name = match &n.property { + DeclarationProperty::Ident(i) => &*i.value, + _ => { + unreachable!(); + } + }; + + match name { "appearance" => { same_content!("-webkit-appearance"); same_content!("-moz-appearance"); @@ -488,13 +507,14 @@ impl VisitMut for Prefixer { "transition" => { let mut value = n.value.clone(); replace_ident(&mut value, "transform", "-webkit-transform"); + let property = DeclarationProperty::Ident(Ident { + span: DUMMY_SP, + value: "-webkit-transition".into(), + raw: "-webkit-transition".into(), + }); self.added.push(Declaration { span: n.span, - property: Ident { - span: n.property.span, - value: "-webkit-transition".into(), - raw: "-webkit-transition".into(), - }, + property, value, important: n.important, });