diff --git a/test/cases/all.json b/test/cases/all.json index 303fca6..716a973 100644 --- a/test/cases/all.json +++ b/test/cases/all.json @@ -20,11 +20,13 @@ "source": { "start": { "line": 2, - "column": 3 + "column": 3, + "offset": 4 }, "end": { "line": 2, - "column": 13 + "column": 14, + "offset": 15 } }, "prop": "color", @@ -34,11 +36,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 1, - "column": 1 + "column": 2, + "offset": 1 } }, "selector": "a" @@ -53,11 +57,13 @@ "source": { "start": { "line": 4, - "column": 1 + "column": 1, + "offset": 17 }, "end": { "line": 4, - "column": 25 + "column": 26, + "offset": 42 } }, "params": "(max-width: 400px)", @@ -77,11 +83,13 @@ "source": { "start": { "line": 6, - "column": 5 + "column": 5, + "offset": 55 }, "end": { "line": 6, - "column": 19 + "column": 20, + "offset": 70 } }, "prop": "padding", @@ -91,11 +99,13 @@ "source": { "start": { "line": 5, - "column": 3 + "column": 3, + "offset": 45 }, "end": { "line": 5, - "column": 7 + "column": 8, + "offset": 50 } }, "selector": ".body" @@ -117,11 +127,13 @@ "source": { "start": { "line": 9, - "column": 3 + "column": 3, + "offset": 80 }, "end": { "line": 9, - "column": 40 + "column": 41, + "offset": 118 } }, "prop": "font-family", @@ -137,11 +149,13 @@ "source": { "start": { "line": 10, - "column": 3 + "column": 3, + "offset": 121 }, "end": { "line": 10, - "column": 32 + "column": 33, + "offset": 151 } }, "text": "transform: rotate(90deg)" @@ -155,11 +169,13 @@ "source": { "start": { "line": 11, - "column": 3 + "column": 3, + "offset": 154 }, "end": { "line": 11, - "column": 19 + "column": 20, + "offset": 171 } }, "prop": "background", @@ -169,11 +185,13 @@ "source": { "start": { "line": 8, - "column": 1 + "column": 1, + "offset": 72 }, "end": { "line": 8, - "column": 5 + "column": 6, + "offset": 77 } }, "selector": ".page" @@ -193,11 +211,13 @@ "source": { "start": { "line": 14, - "column": 3 + "column": 3, + "offset": 182 }, "end": { "line": 14, - "column": 14 + "column": 15, + "offset": 194 } }, "prop": "width", @@ -218,11 +238,13 @@ "source": { "start": { "line": 16, - "column": 5 + "column": 5, + "offset": 209 }, "end": { "line": 16, - "column": 16 + "column": 17, + "offset": 221 } }, "prop": "width", @@ -232,11 +254,13 @@ "source": { "start": { "line": 15, - "column": 3 + "column": 3, + "offset": 197 }, "end": { "line": 15, - "column": 9 + "column": 10, + "offset": 204 } }, "selector": "&_title" @@ -245,11 +269,13 @@ "source": { "start": { "line": 13, - "column": 1 + "column": 1, + "offset": 173 }, "end": { "line": 13, - "column": 6 + "column": 7, + "offset": 179 } }, "selector": ".phone" @@ -275,11 +301,13 @@ "source": { "start": { "line": 20, - "column": 5 + "column": 5, + "offset": 244 }, "end": { "line": 20, - "column": 16 + "column": 17, + "offset": 256 } }, "prop": "color", @@ -294,11 +322,13 @@ "source": { "start": { "line": 21, - "column": 5 + "column": 5, + "offset": 261 }, "end": { "line": 21, - "column": 21 + "column": 22, + "offset": 278 } }, "prop": "background", @@ -308,11 +338,13 @@ "source": { "start": { "line": 19, - "column": 3 + "column": 3, + "offset": 231 }, "end": { "line": 19, - "column": 10 + "column": 11, + "offset": 239 } }, "selector": "--black:" @@ -321,24 +353,27 @@ "source": { "start": { "line": 18, - "column": 1 + "column": 1, + "offset": 223 }, "end": { "line": 18, - "column": 5 + "column": 6, + "offset": 228 } }, "selector": ":root" - } - ], + }], "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { - "line": 21, - "column": 21 + "line": 22, + "column": 1, + "offset": 279 } } -} +} \ No newline at end of file diff --git a/test/cases/atrules.json b/test/cases/atrules.json index 58921c3..ab0c911 100644 --- a/test/cases/atrules.json +++ b/test/cases/atrules.json @@ -15,11 +15,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 1, - "column": 5 + "column": 5, + "offset": 4 } }, "params": "" @@ -34,11 +36,13 @@ "source": { "start": { "line": 3, - "column": 1 + "column": 1, + "offset": 7 }, "end": { "line": 3, - "column": 16 + "column": 16, + "offset": 22 } }, "params": "\"UTF-8\"" @@ -53,11 +57,13 @@ "source": { "start": { "line": 5, - "column": 1 + "column": 1, + "offset": 25 }, "end": { "line": 6, - "column": 29 + "column": 29, + "offset": 79 } }, "params": "(color: black),\n (background: black)", @@ -77,11 +83,13 @@ "source": { "start": { "line": 7, - "column": 3 + "column": 3, + "offset": 82 }, "end": { "line": 7, - "column": 44 + "column": 44, + "offset": 123 } }, "params": "(max-width: 400px) ", @@ -97,11 +105,13 @@ "source": { "start": { "line": 8, - "column": 5 + "column": 5, + "offset": 126 }, "end": { "line": 8, - "column": 22 + "column": 22, + "offset": 143 } }, "text": "write code here" @@ -114,11 +124,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 8, - "column": 22 + "column": 22, + "offset": 143 } } -} +} \ No newline at end of file diff --git a/test/cases/colons.json b/test/cases/colons.json index f0de613..9fbcaf9 100644 --- a/test/cases/colons.json +++ b/test/cases/colons.json @@ -15,11 +15,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 1, - "column": 34 + "column": 35, + "offset": 34 } }, "params": ":--heading h1, h2" @@ -45,11 +47,13 @@ "source": { "start": { "line": 5, - "column": 5 + "column": 5, + "offset": 56 }, "end": { "line": 5, - "column": 10 + "column": 11, + "offset": 62 } }, "prop": "top", @@ -64,11 +68,13 @@ "source": { "start": { "line": 6, - "column": 5 + "column": 5, + "offset": 67 }, "end": { "line": 6, - "column": 11 + "column": 12, + "offset": 74 } }, "prop": "left", @@ -78,11 +84,13 @@ "source": { "start": { "line": 4, - "column": 3 + "column": 3, + "offset": 44 }, "end": { "line": 4, - "column": 9 + "column": 10, + "offset": 51 } }, "selector": "margin:" @@ -102,11 +110,13 @@ "source": { "start": { "line": 8, - "column": 5 + "column": 5, + "offset": 87 }, "end": { "line": 8, - "column": 14 + "column": 15, + "offset": 97 } }, "prop": "size", @@ -121,11 +131,13 @@ "source": { "start": { "line": 9, - "column": 5 + "column": 5, + "offset": 102 }, "end": { "line": 9, - "column": 15 + "column": 16, + "offset": 113 } }, "prop": "weight", @@ -135,11 +147,13 @@ "source": { "start": { "line": 7, - "column": 3 + "column": 3, + "offset": 77 }, "end": { "line": 7, - "column": 7 + "column": 8, + "offset": 82 } }, "selector": "font:" @@ -148,11 +162,13 @@ "source": { "start": { "line": 3, - "column": 1 + "column": 1, + "offset": 36 }, "end": { "line": 3, - "column": 5 + "column": 6, + "offset": 41 } }, "selector": ".test" @@ -172,11 +188,13 @@ "source": { "start": { "line": 12, - "column": 3 + "column": 3, + "offset": 130 }, "end": { "line": 12, - "column": 13 + "column": 14, + "offset": 141 } }, "prop": "color", @@ -186,11 +204,13 @@ "source": { "start": { "line": 11, - "column": 1 + "column": 1, + "offset": 115 }, "end": { "line": 11, - "column": 12 + "column": 13, + "offset": 127 } }, "selector": "a:--any-link" @@ -216,11 +236,13 @@ "source": { "start": { "line": 15, - "column": 5 + "column": 5, + "offset": 175 }, "end": { "line": 15, - "column": 15 + "column": 16, + "offset": 186 } }, "prop": "color", @@ -230,11 +252,13 @@ "source": { "start": { "line": 14, - "column": 3 + "column": 3, + "offset": 157 }, "end": { "line": 14, - "column": 15 + "column": 16, + "offset": 170 } }, "selector": "&.is-disabled" @@ -243,11 +267,13 @@ "source": { "start": { "line": 13, - "column": 1 + "column": 1, + "offset": 142 }, "end": { "line": 13, - "column": 12 + "column": 13, + "offset": 154 } }, "selector": "a:--any-link" @@ -267,11 +293,13 @@ "source": { "start": { "line": 18, - "column": 3 + "column": 3, + "offset": 209 }, "end": { "line": 18, - "column": 13 + "column": 14, + "offset": 220 } }, "prop": "color", @@ -281,11 +309,13 @@ "source": { "start": { "line": 17, - "column": 1 + "column": 1, + "offset": 188 }, "end": { "line": 17, - "column": 18 + "column": 19, + "offset": 206 } }, "selector": "article :--heading" @@ -305,11 +335,13 @@ "source": { "start": { "line": 21, - "column": 3 + "column": 3, + "offset": 230 }, "end": { "line": 21, - "column": 13 + "column": 14, + "offset": 241 } }, "prop": "--red", @@ -319,11 +351,13 @@ "source": { "start": { "line": 20, - "column": 1 + "column": 1, + "offset": 222 }, "end": { "line": 20, - "column": 5 + "column": 6, + "offset": 227 } }, "selector": ":root" @@ -343,11 +377,13 @@ "source": { "start": { "line": 24, - "column": 3 + "column": 3, + "offset": 250 }, "end": { "line": 24, - "column": 19 + "column": 20, + "offset": 267 } }, "prop": "color", @@ -357,11 +393,13 @@ "source": { "start": { "line": 23, - "column": 1 + "column": 1, + "offset": 243 }, "end": { "line": 23, - "column": 4 + "column": 5, + "offset": 247 } }, "selector": "body" @@ -370,11 +408,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { - "line": 24, - "column": 19 + "line": 25, + "column": 1, + "offset": 268 } } -} +} \ No newline at end of file diff --git a/test/cases/comments.json b/test/cases/comments.json index df54375..1b0fad2 100644 --- a/test/cases/comments.json +++ b/test/cases/comments.json @@ -15,11 +15,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 2, - "column": 10 + "column": 10, + "offset": 20 } }, "text": "multi\n line" @@ -35,11 +37,13 @@ "source": { "start": { "line": 3, - "column": 1 + "column": 1, + "offset": 21 }, "end": { "line": 3, - "column": 9 + "column": 9, + "offset": 29 } }, "text": "inline" @@ -59,11 +63,13 @@ "source": { "start": { "line": 5, - "column": 3 + "column": 3, + "offset": 34 }, "end": { "line": 5, - "column": 14 + "column": 14, + "offset": 45 } }, "prop": "color", @@ -80,11 +86,13 @@ "source": { "start": { "line": 5, - "column": 16 + "column": 16, + "offset": 47 }, "end": { "line": 5, - "column": 22 + "column": 25, + "offset": 56 } }, "text": "last" @@ -98,11 +106,13 @@ "source": { "start": { "line": 6, - "column": 3 + "column": 3, + "offset": 58 }, "end": { "line": 6, - "column": 12 + "column": 12, + "offset": 67 } }, "prop": "z-index", @@ -112,11 +122,13 @@ "source": { "start": { "line": 4, - "column": 1 + "column": 1, + "offset": 30 }, "end": { "line": 4, - "column": 1 + "column": 1, + "offset": 30 } }, "selector": "a" @@ -132,11 +144,13 @@ "source": { "start": { "line": 8, - "column": 1 + "column": 1, + "offset": 68 }, "end": { "line": 8, - "column": 4 + "column": 6, + "offset": 73 } }, "text": "a" @@ -153,11 +167,13 @@ "source": { "start": { "line": 9, - "column": 3 + "column": 3, + "offset": 75 }, "end": { "line": 9, - "column": 17 + "column": 21, + "offset": 93 } }, "text": "color: black" @@ -166,11 +182,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 9, - "column": 17 + "column": 21, + "offset": 93 } } -} +} \ No newline at end of file diff --git a/test/cases/decls.json b/test/cases/decls.json index 0c784e4..a94cb69 100644 --- a/test/cases/decls.json +++ b/test/cases/decls.json @@ -13,11 +13,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 1, - "column": 12 + "column": 13, + "offset": 12 } }, "prop": "color", @@ -32,11 +34,13 @@ "source": { "start": { "line": 3, - "column": 1 + "column": 1, + "offset": 14 }, "end": { "line": 4, - "column": 41 + "column": 42, + "offset": 98 } }, "prop": "background", @@ -51,11 +55,13 @@ "source": { "start": { "line": 6, - "column": 1 + "column": 1, + "offset": 100 }, "end": { "line": 8, - "column": 16 + "column": 17, + "offset": 147 } }, "prop": "box-shadow", @@ -70,11 +76,13 @@ "source": { "start": { "line": 10, - "column": 1 + "column": 1, + "offset": 149 }, "end": { "line": 10, - "column": 19 + "column": 20, + "offset": 168 } }, "prop": "$(var)-color", @@ -84,11 +92,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { - "line": 10, - "column": 19 + "line": 11, + "column": 1, + "offset": 169 } } -} +} \ No newline at end of file diff --git a/test/cases/empty.json b/test/cases/empty.json index 960e17e..a0a608a 100644 --- a/test/cases/empty.json +++ b/test/cases/empty.json @@ -15,11 +15,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 1, - "column": 2 + "column": 3, + "offset": 2 } }, "text": "" @@ -28,11 +30,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { - "line": 1, - "column": 2 + "line": 2, + "column": 1, + "offset": 3 } } -} +} \ No newline at end of file diff --git a/test/cases/important.json b/test/cases/important.json index 0cd71e1..6d34e64 100644 --- a/test/cases/important.json +++ b/test/cases/important.json @@ -14,11 +14,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 1, - "column": 11 + "column": 12, + "offset": 11 } }, "prop": "long", @@ -35,11 +37,13 @@ "source": { "start": { "line": 2, - "column": 1 + "column": 1, + "offset": 23 }, "end": { "line": 2, - "column": 12 + "column": 13, + "offset": 35 } }, "prop": "short", @@ -50,11 +54,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { - "line": 2, - "column": 22 + "line": 3, + "column": 1, + "offset": 46 } } -} +} \ No newline at end of file diff --git a/test/cases/rules.json b/test/cases/rules.json index 0536993..4716a0d 100644 --- a/test/cases/rules.json +++ b/test/cases/rules.json @@ -26,11 +26,13 @@ "source": { "start": { "line": 3, - "column": 5 + "column": 5, + "offset": 10 }, "end": { "line": 3, - "column": 16 + "column": 16, + "offset": 21 } }, "prop": "color", @@ -40,11 +42,13 @@ "source": { "start": { "line": 2, - "column": 3 + "column": 3, + "offset": 3 }, "end": { "line": 2, - "column": 3 + "column": 3, + "offset": 3 } }, "selector": "b" @@ -53,11 +57,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 } }, "selector": "a" @@ -77,11 +83,13 @@ "source": { "start": { "line": 7, - "column": 3 + "column": 3, + "offset": 40 }, "end": { "line": 7, - "column": 14 + "column": 14, + "offset": 51 } }, "prop": "color", @@ -91,11 +99,13 @@ "source": { "start": { "line": 5, - "column": 1 + "column": 1, + "offset": 27 }, "end": { "line": 6, - "column": 1 + "column": 1, + "offset": 39 } }, "selector": "a,\nb" @@ -120,11 +130,13 @@ "source": { "start": { "line": 11, - "column": 3 + "column": 3, + "offset": 75 }, "end": { "line": 11, - "column": 14 + "column": 14, + "offset": 86 } }, "prop": "color", @@ -134,11 +146,13 @@ "source": { "start": { "line": 9, - "column": 1 + "column": 1, + "offset": 61 }, "end": { "line": 10, - "column": 2 + "column": 2, + "offset": 74 } }, "selector": "a b \nem" @@ -158,11 +172,13 @@ "source": { "start": { "line": 14, - "column": 3 + "column": 3, + "offset": 100 }, "end": { "line": 14, - "column": 15 + "column": 15, + "offset": 112 } }, "prop": "family", @@ -172,11 +188,13 @@ "source": { "start": { "line": 13, - "column": 1 + "column": 1, + "offset": 87 }, "end": { "line": 13, - "column": 5 + "column": 5, + "offset": 91 } }, "selector": "font:" @@ -196,11 +214,13 @@ "source": { "start": { "line": 17, - "column": 3 + "column": 3, + "offset": 125 }, "end": { "line": 17, - "column": 14 + "column": 14, + "offset": 136 } }, "prop": "color", @@ -210,11 +230,13 @@ "source": { "start": { "line": 16, - "column": 1 + "column": 1, + "offset": 113 }, "end": { "line": 16, - "column": 8 + "column": 8, + "offset": 120 } }, "selector": "[attr=;]" @@ -223,11 +245,13 @@ "source": { "start": { "line": 1, - "column": 1 + "column": 1, + "offset": 0 }, "end": { "line": 17, - "column": 14 + "column": 14, + "offset": 136 } } -} +} \ No newline at end of file