From 9e6cc980941f7319b5cd7618dcc37b88f39805a6 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 30 Mar 2020 16:34:30 -0700 Subject: [PATCH 01/10] Regenerate snapshots from a clean master --- test/snapshots/numeric.test.js.md | 500 +++++++++++++++--------------- 1 file changed, 250 insertions(+), 250 deletions(-) diff --git a/test/snapshots/numeric.test.js.md b/test/snapshots/numeric.test.js.md index c898dbe..a853e2b 100644 --- a/test/snapshots/numeric.test.js.md +++ b/test/snapshots/numeric.test.js.md @@ -43,6 +43,131 @@ Generated by [AVA](https://ava.li). }, ] +## -.3s + +> Snapshot 1 + + '-.3s' + +> Snapshot 2 + + '-.3s' + +> Snapshot 3 + + [ + Numeric { + raws: { + after: '', + before: '', + }, + source: { + end: { + column: 1, + line: 1, + }, + input: Input { + css: '-.3s', + hasBOM: false, + id: '', + }, + start: { + column: 1, + line: 1, + }, + }, + type: 'numeric', + unit: 's', + value: '-.3', + }, + ] + +## -.3s + 0.5s + +> Snapshot 1 + + '-.3s' + +> Snapshot 2 + + '-.3s + 0.5s' + +> Snapshot 3 + + [ + Numeric { + raws: { + after: '', + before: '', + }, + source: { + end: { + column: 1, + line: 1, + }, + input: Input { + css: '-.3s + 0.5s', + hasBOM: false, + id: '', + }, + start: { + column: 1, + line: 1, + }, + }, + type: 'numeric', + unit: 's', + value: '-.3', + }, + Operator { + raws: { + after: '', + before: ' ', + }, + source: { + end: { + column: 6, + line: 1, + }, + input: Input { + css: '-.3s + 0.5s', + hasBOM: false, + id: '', + }, + start: { + column: 6, + line: 1, + }, + }, + type: 'operator', + value: '+', + }, + Numeric { + raws: { + after: '', + before: ' ', + }, + source: { + end: { + column: 8, + line: 1, + }, + input: Input { + css: '-.3s + 0.5s', + hasBOM: false, + id: '', + }, + start: { + column: 8, + line: 1, + }, + }, + type: 'numeric', + unit: 's', + value: '0.5', + }, + ] + ## -.567800E-0012780em > Snapshot 1 @@ -505,6 +630,131 @@ Generated by [AVA](https://ava.li). }, ] +## 0.5s + +> Snapshot 1 + + '0.5s' + +> Snapshot 2 + + '0.5s' + +> Snapshot 3 + + [ + Numeric { + raws: { + after: '', + before: '', + }, + source: { + end: { + column: 1, + line: 1, + }, + input: Input { + css: '0.5s', + hasBOM: false, + id: '', + }, + start: { + column: 1, + line: 1, + }, + }, + type: 'numeric', + unit: 's', + value: '0.5', + }, + ] + +## 0.5s + 0.5s + +> Snapshot 1 + + '0.5s' + +> Snapshot 2 + + '0.5s + 0.5s' + +> Snapshot 3 + + [ + Numeric { + raws: { + after: '', + before: '', + }, + source: { + end: { + column: 1, + line: 1, + }, + input: Input { + css: '0.5s + 0.5s', + hasBOM: false, + id: '', + }, + start: { + column: 1, + line: 1, + }, + }, + type: 'numeric', + unit: 's', + value: '0.5', + }, + Operator { + raws: { + after: '', + before: ' ', + }, + source: { + end: { + column: 6, + line: 1, + }, + input: Input { + css: '0.5s + 0.5s', + hasBOM: false, + id: '', + }, + start: { + column: 6, + line: 1, + }, + }, + type: 'operator', + value: '+', + }, + Numeric { + raws: { + after: '', + before: ' ', + }, + source: { + end: { + column: 8, + line: 1, + }, + input: Input { + css: '0.5s + 0.5s', + hasBOM: false, + id: '', + }, + start: { + column: 8, + line: 1, + }, + }, + type: 'numeric', + unit: 's', + value: '0.5', + }, + ] + ## 10q > Snapshot 1 @@ -1052,256 +1302,6 @@ Generated by [AVA](https://ava.li). }, ] -## -.3s - -> Snapshot 1 - - '-.3s' - -> Snapshot 2 - - '-.3s' - -> Snapshot 3 - - [ - Numeric { - raws: { - after: '', - before: '', - }, - source: { - end: { - column: 1, - line: 1, - }, - input: Input { - css: '-.3s', - hasBOM: false, - id: '', - }, - start: { - column: 1, - line: 1, - }, - }, - type: 'numeric', - unit: 's', - value: '-.3', - }, - ] - -## -.3s + 0.5s - -> Snapshot 1 - - '-.3s' - -> Snapshot 2 - - '-.3s + 0.5s' - -> Snapshot 3 - - [ - Numeric { - raws: { - after: '', - before: '', - }, - source: { - end: { - column: 1, - line: 1, - }, - input: Input { - css: '-.3s + 0.5s', - hasBOM: false, - id: '', - }, - start: { - column: 1, - line: 1, - }, - }, - type: 'numeric', - unit: 's', - value: '-.3', - }, - Operator { - raws: { - after: '', - before: ' ', - }, - source: { - end: { - column: 6, - line: 1, - }, - input: Input { - css: '-.3s + 0.5s', - hasBOM: false, - id: '', - }, - start: { - column: 6, - line: 1, - }, - }, - type: 'operator', - value: '+', - }, - Numeric { - raws: { - after: '', - before: ' ', - }, - source: { - end: { - column: 8, - line: 1, - }, - input: Input { - css: '-.3s + 0.5s', - hasBOM: false, - id: '', - }, - start: { - column: 8, - line: 1, - }, - }, - type: 'numeric', - unit: 's', - value: '0.5', - }, - ] - -## 0.5s - -> Snapshot 1 - - '0.5s' - -> Snapshot 2 - - '0.5s' - -> Snapshot 3 - - [ - Numeric { - raws: { - after: '', - before: '', - }, - source: { - end: { - column: 1, - line: 1, - }, - input: Input { - css: '0.5s', - hasBOM: false, - id: '', - }, - start: { - column: 1, - line: 1, - }, - }, - type: 'numeric', - unit: 's', - value: '0.5', - }, - ] - -## 0.5s + 0.5s - -> Snapshot 1 - - '0.5s' - -> Snapshot 2 - - '0.5s + 0.5s' - -> Snapshot 3 - - [ - Numeric { - raws: { - after: '', - before: '', - }, - source: { - end: { - column: 1, - line: 1, - }, - input: Input { - css: '0.5s + 0.5s', - hasBOM: false, - id: '', - }, - start: { - column: 1, - line: 1, - }, - }, - type: 'numeric', - unit: 's', - value: '0.5', - }, - Operator { - raws: { - after: '', - before: ' ', - }, - source: { - end: { - column: 6, - line: 1, - }, - input: Input { - css: '0.5s + 0.5s', - hasBOM: false, - id: '', - }, - start: { - column: 6, - line: 1, - }, - }, - type: 'operator', - value: '+', - }, - Numeric { - raws: { - after: '', - before: ' ', - }, - source: { - end: { - column: 8, - line: 1, - }, - input: Input { - css: '0.5s + 0.5s', - hasBOM: false, - id: '', - }, - start: { - column: 8, - line: 1, - }, - }, - type: 'numeric', - unit: 's', - value: '0.5', - }, - ] - ## 500ms > Snapshot 1 From 1698e196065eb5e8648f26969f7459044b2c269a Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 10 Feb 2020 18:59:27 -0800 Subject: [PATCH 02/10] Report better errors for values parsed from a PostCSS stylesheet Closes #98 --- lib/SubInput.js | 55 +++++++++++++++++++++++++++++++++++++++++++++++ lib/index.js | 57 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 lib/SubInput.js diff --git a/lib/SubInput.js b/lib/SubInput.js new file mode 100644 index 0000000..2df5279 --- /dev/null +++ b/lib/SubInput.js @@ -0,0 +1,55 @@ +/* + Copyright © 2018 Andrew Powell + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of this Source Code Form. +*/ + +// A PostCSS Input that exposes a substring of a larger Input as though it were +// the entire text to be parsed. +module.exports = class SubInput { + constructor(css, context, lineInContext, columnInContext) { + this.css = css; + this.context = context; + this.lineInContext = lineInContext; + this.columnInContext = columnInContext; + } + + error(message, line, column, opts = {}) { + let lineInContext; + let columnInContext; + if (line === 1) { + lineInContext = this.lineInContext; + columnInContext = column + this.columnInContext - 1; + } else { + lineInContext = this.lineInContext + line - 1; + } + + return this.context.error(message, lineInContext, columnInContext, opts); + } + + origin(line, column) { + let lineInContext; + let columnInContext; + if (line === 1) { + lineInContext = this.lineInContext; + columnInContext = column + this.columnInContext - 1; + } else { + lineInContext = this.lineInContext + line - 1; + } + + return this.context.origin(lineInContext, columnInContext); + } + + mapResolve(file) { + return this.context.mapResolve(file); + } + + get from() { + return this.context.from; + } +}; diff --git a/lib/index.js b/lib/index.js index c8cf4ac..2520e90 100644 --- a/lib/index.js +++ b/lib/index.js @@ -8,14 +8,51 @@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of this Source Code Form. */ +const assert = require('assert').strict; + const Input = require('postcss/lib/input'); const Parser = require('./ValuesParser'); +const SubInput = require('./SubInput'); const { stringify } = require('./ValuesStringifier'); +const NEWLINE = '\n'.charCodeAt(0); +const FEED = '\f'.charCodeAt(0); +const CR = '\r'.charCodeAt(0); + +function positionAfter(node, chunks) { + let { line } = node.source.start; + let { column } = node.source.start; + for (const chunk of chunks) { + for (let i = 0; i < chunk.length; i++) { + const code = chunk.charCodeAt(i); + if ( + code === NEWLINE || + code === FEED || + (code === CR && chunk.charCodeAt(i + 1) !== NEWLINE) + ) { + column = 1; + line += 1; + } else { + column += 1; + } + } + } + + return { line, column }; +} + module.exports = { parse(css, options) { - const input = new Input(css, options); + let input; + if (options.context) { + assert(options.lineInContext); + assert(options.columnInContext); + input = new SubInput(css, options.context, options.lineInContext, options.columnInContext); + } else { + input = new Input(css, options); + } + const parser = new Parser(input, options); parser.parse(); @@ -32,6 +69,24 @@ module.exports = { return parser.root; }, + parseDeclValue(decl) { + const { line, column } = positionAfter(decl, [decl.prop, decl.raws.between]); + return module.exports.parse(decl.value, { + context: decl.source.input, + lineInContext: line, + columnInContext: column + }); + }, + + parseAtRuleParams(rule) { + const { line, column } = positionAfter(rule, ['@', rule.name, rule.raws.afterName]); + return module.exports.parse(rule.value, { + context: rule, + lineInContext: line, + columnInContext: column + }); + }, + stringify, nodeToString(node) { From 7de90f1dac3d8d9dfe2050ba9ea7916b6e4898de Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 17 Feb 2020 14:12:31 -0800 Subject: [PATCH 03/10] Add documentation --- docs/Exports.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ lib/index.js | 6 +++-- 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/docs/Exports.md b/docs/Exports.md index dd8a1f4..fb9e3dd 100644 --- a/docs/Exports.md +++ b/docs/Exports.md @@ -37,6 +37,71 @@ Default: `{ prefixes: ['--'] }` Set this option to modify how variables are identified in a value. By default, this option is set to recognize CSS variables. For languages such as LESS and SCSS which have their own variable prefixes, additional prefixes can be added to the `prefixes` array. +##### `context` +Type: [`postcss.Input`][]
+Default: `undefined` + +[`postcss.Input`]: http://api.postcss.org/Input.html + +Set this option along with [`lineInContext`][] and [`columnInContext`][] to indicate the value's location in a larger CSS file that's been parsed by PostCSS. When these options are set, the values' `source` properties will refer to their locations inside the original CSS file which produces better error messages. + +[`lineInContext`]: #lineincontext +[`columnInContext`]: #columnincontext + +If this is set, `lineInContext` and `columnInContext` must be set as well. The [`parseDeclValue()`][] and [`parseAtRuleParams()`][] functions automatically set these options appropriately. + +[`parseDeclValue()`]: #parsedeclvaluedecl-options +[`parseAtRuleParams()`]: #parseatruleparamsrule-options + +##### `lineInContext` +Type: `Number`
+Default: `undefined` + +Indicates the line number in the [`context`][] on which the value being parsed begins. + +[`context`]: #context + +If this is set, `context` and [`columnInContext`][] must be set as well. The [`parseDeclValue()`][] and [`parseAtRuleParams()`][] functions automatically set these options appropriately. + +##### `columnInContext` +Type: `Number`
+Default: `undefined` + +Indicates the column number in the [`context`][] on which the value being parsed begins. + +If this is set, `context` and [`lineInContext`][] must be set as well. The [`parseDeclValue()`][] and [`parseAtRuleParams()`][] functions automatically set these options appropriately. + +### `parseDeclValue(decl, options)` + +A shorthand for calling [`parse()`][] on the value of a [`postcss.Declaration`][] object. This automatically sets the [`context`][], [`lineInContext`][], and [`columnInContext`][] options appropriately. + +[`postcss.Declaration`]: http://api.postcss.org/Declaration.html +[`parse()`]: #parsecss-options + +#### Parameters + +#### `decl` +Type: [`postcss.Declaration`][]
+_Required_ + +#### `options` +Type: `Object` + +### `parseAtRuleParams(rule, options)` + +A shorthand for calling [`parse()`][] on the parameters of a [`postcss.AtRule`][] object. This automatically sets the [`context`][], [`lineInContext`][], and [`columnInContext`][] options appropriately. + +[`postcss.AtRule`]: http://api.postcss.org/AtRule.html + +#### Parameters + +#### `decl` +Type: [`postcss.AtRule`][]
+_Required_ + +#### `options` +Type: `Object` + ### `stringify(node, builder)` A `Function` with a signature matching `(bit) => {}` used to concatenate or manipulate each portion (or bit) of the Node's own AST. The `nodeToString` method makes use of this, as a simple example. diff --git a/lib/index.js b/lib/index.js index 2520e90..206f91f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -69,18 +69,20 @@ module.exports = { return parser.root; }, - parseDeclValue(decl) { + parseDeclValue(decl, options) { const { line, column } = positionAfter(decl, [decl.prop, decl.raws.between]); return module.exports.parse(decl.value, { + ...options, context: decl.source.input, lineInContext: line, columnInContext: column }); }, - parseAtRuleParams(rule) { + parseAtRuleParams(rule, options) { const { line, column } = positionAfter(rule, ['@', rule.name, rule.raws.afterName]); return module.exports.parse(rule.value, { + ...options, context: rule, lineInContext: line, columnInContext: column From 2c86e263230e0663d90ca4dd27242d962434f089 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 17 Feb 2020 14:17:14 -0800 Subject: [PATCH 04/10] Don't use assert() for errors --- lib/index.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index 206f91f..c02d7f9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -8,8 +8,6 @@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of this Source Code Form. */ -const assert = require('assert').strict; - const Input = require('postcss/lib/input'); const Parser = require('./ValuesParser'); @@ -46,9 +44,19 @@ module.exports = { parse(css, options) { let input; if (options.context) { - assert(options.lineInContext); - assert(options.columnInContext); + if (!options.lineInContext || !options.columnInContext) { + throw new RangeError( + 'If the context option is passed, lineInContext and ' + + 'columnInContext must also be passed.' + ); + } + input = new SubInput(css, options.context, options.lineInContext, options.columnInContext); + } else if (options.lineInContext || options.columnInContext) { + throw new RangeError( + "If the context option isn't passed, lineInContext and " + + 'columnInContext may not be passed.' + ); } else { input = new Input(css, options); } From e0c32aeea7b0c73bab92361687ca6b005587e462 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 17 Feb 2020 14:27:08 -0800 Subject: [PATCH 05/10] Update typings --- lib/index.d.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index 97488dd..eda5d92 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -205,12 +205,28 @@ export interface Word extends NodeBase { export function parse(css: string, options?: ParseOptions): Root; -export interface ParseOptions { +export function parseDeclValue( + decl: postcss.Declaration, + options?: ParseOptionsWithoutContext +): Root; + +export function parseAtRuleParams( + rule: postcss.AtRule, + options?: ParseOptions +): Root; + +export interface ParseOptionsWithoutContext { ignoreUnknownWords?: boolean; interpolation?: boolean | InterpolationOptions; variables?: VariablesOptions; } +export interface ParseOptions extends ParseOptionsWithoutContext { + context: postcss.Input; + lineInContext: Number; + columnInContext: Number; +} + export interface InterpolationOptions { prefix: string; } From b8b374a96299d3a4c64a8c4db3591ce27230e876 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 17 Feb 2020 15:19:36 -0800 Subject: [PATCH 06/10] Fix bugs --- lib/SubInput.js | 1 + lib/index.js | 2 ++ lib/nodes/Func.js | 7 ++++++- lib/nodes/Interpolation.js | 7 ++++++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/SubInput.js b/lib/SubInput.js index 2df5279..abffe4c 100644 --- a/lib/SubInput.js +++ b/lib/SubInput.js @@ -27,6 +27,7 @@ module.exports = class SubInput { columnInContext = column + this.columnInContext - 1; } else { lineInContext = this.lineInContext + line - 1; + columnInContext = column; } return this.context.error(message, lineInContext, columnInContext, opts); diff --git a/lib/index.js b/lib/index.js index c02d7f9..11431cf 100644 --- a/lib/index.js +++ b/lib/index.js @@ -42,6 +42,8 @@ function positionAfter(node, chunks) { module.exports = { parse(css, options) { + if (!options) options = {}; + let input; if (options.context) { if (!options.lineInContext || !options.columnInContext) { diff --git a/lib/nodes/Func.js b/lib/nodes/Func.js index a4433de..e6fe3c9 100644 --- a/lib/nodes/Func.js +++ b/lib/nodes/Func.js @@ -86,7 +86,12 @@ class Func extends Container { // use a new parser to parse the params of the function. recursion here makes for easier maint // we must require this here due to circular dependency resolution const { parse } = require('../'); // eslint-disable-line global-require - const root = parse(params, opts); + const root = parse(params, { + ...opts, + context: parser.input, + lineInContext: brackets[2], + columnInContext: brackets[3] + 1 + }); const { nodes: children } = root; // TODO: correct line and character position (should we just pad the input? probably easiest) diff --git a/lib/nodes/Interpolation.js b/lib/nodes/Interpolation.js index 4f81edd..74cda29 100644 --- a/lib/nodes/Interpolation.js +++ b/lib/nodes/Interpolation.js @@ -66,7 +66,12 @@ class Interpolation extends Container { // use a new parser to parse the params of the function. recursion here makes for easier maint // we must require this here due to circular dependency resolution const { parse } = require('../'); // eslint-disable-line global-require - const { nodes: children } = parse(params, parser.options); + const { nodes: children } = parse(params, { + ...parser.options, + context: parser.input, + lineInContext: first[2], + columnInContext: first[3] + first[1].length + 1 + }); // TODO: correct line and character position (should we just pad the input? probably easiest) for (const child of children) { From dfc8324f67a21bf8c593d872a7e530e6a8766b64 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 30 Mar 2020 16:35:21 -0700 Subject: [PATCH 07/10] Regenerate snapshots --- test/snapshots/func.test.js.md | 828 ++++++++++++++++------ test/snapshots/func.test.js.snap | Bin 11507 -> 11611 bytes test/snapshots/interpolation.test.js.md | 59 +- test/snapshots/interpolation.test.js.snap | Bin 1582 -> 1635 bytes 4 files changed, 641 insertions(+), 246 deletions(-) diff --git a/test/snapshots/func.test.js.md b/test/snapshots/func.test.js.md index 6142d51..1fd0784 100644 --- a/test/snapshots/func.test.js.md +++ b/test/snapshots/func.test.js.md @@ -33,10 +33,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 25, + context: Input { + css: '-webkit-linear-gradient(0)', + hasBOM: false, + id: '', + }, css: '0', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -62,7 +67,7 @@ Generated by [AVA](https://ava.li). input: Input { css: '-webkit-linear-gradient(0)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -102,10 +107,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RGBA( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -127,10 +137,15 @@ Generated by [AVA](https://ava.li). column: 4, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RGBA( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 4, @@ -151,10 +166,15 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RGBA( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -176,10 +196,15 @@ Generated by [AVA](https://ava.li). column: 10, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RGBA( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 10, @@ -200,10 +225,15 @@ Generated by [AVA](https://ava.li). column: 12, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RGBA( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 12, @@ -229,7 +259,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'RGBA( 29, 439 , 29 )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -269,10 +299,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RgBa( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -294,10 +329,15 @@ Generated by [AVA](https://ava.li). column: 4, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RgBa( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 4, @@ -318,10 +358,15 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RgBa( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -343,10 +388,15 @@ Generated by [AVA](https://ava.li). column: 10, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RgBa( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 10, @@ -367,10 +417,15 @@ Generated by [AVA](https://ava.li). column: 12, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'RgBa( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 12, @@ -396,7 +451,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'RgBa( 29, 439 , 29 )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -445,10 +500,20 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: SubInput { + columnInContext: 5, + context: Input { + css: 'bar(baz(black, 10%), 10%)', + hasBOM: false, + id: '', + }, + css: 'baz(black, 10%), 10%', + lineInContext: 1, + }, css: 'black, 10%', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -469,10 +534,20 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: SubInput { + columnInContext: 5, + context: Input { + css: 'bar(baz(black, 10%), 10%)', + hasBOM: false, + id: '', + }, + css: 'baz(black, 10%), 10%', + lineInContext: 1, + }, css: 'black, 10%', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -493,10 +568,20 @@ Generated by [AVA](https://ava.li). column: 8, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: SubInput { + columnInContext: 5, + context: Input { + css: 'bar(baz(black, 10%), 10%)', + hasBOM: false, + id: '', + }, + css: 'baz(black, 10%), 10%', + lineInContext: 1, + }, css: 'black, 10%', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 8, @@ -520,10 +605,15 @@ Generated by [AVA](https://ava.li). column: 4, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'bar(baz(black, 10%), 10%)', + hasBOM: false, + id: '', + }, css: 'baz(black, 10%), 10%', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -543,10 +633,15 @@ Generated by [AVA](https://ava.li). column: 16, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'bar(baz(black, 10%), 10%)', + hasBOM: false, + id: '', + }, css: 'baz(black, 10%), 10%', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 16, @@ -567,10 +662,15 @@ Generated by [AVA](https://ava.li). column: 18, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'bar(baz(black, 10%), 10%)', + hasBOM: false, + id: '', + }, css: 'baz(black, 10%), 10%', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 18, @@ -596,7 +696,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'bar(baz(black, 10%), 10%)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -636,10 +736,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -660,10 +765,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -684,10 +794,15 @@ Generated by [AVA](https://ava.li). column: 3, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 3, @@ -709,10 +824,15 @@ Generated by [AVA](https://ava.li). column: 9, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 9, @@ -733,10 +853,15 @@ Generated by [AVA](https://ava.li). column: 11, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 11, @@ -758,10 +883,15 @@ Generated by [AVA](https://ava.li). column: 16, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 16, @@ -782,10 +912,15 @@ Generated by [AVA](https://ava.li). column: 18, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 18, @@ -806,10 +941,15 @@ Generated by [AVA](https://ava.li). column: 20, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 20, @@ -831,10 +971,15 @@ Generated by [AVA](https://ava.li). column: 21, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 21, @@ -855,10 +1000,15 @@ Generated by [AVA](https://ava.li). column: 23, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 23, @@ -879,10 +1029,15 @@ Generated by [AVA](https://ava.li). column: 25, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(((768px - 100vw) / 2) - 15px)', + hasBOM: false, + id: '', + }, css: '((768px - 100vw) / 2) - 15px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 25, @@ -908,7 +1063,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'calc(((768px - 100vw) / 2) - 15px)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -948,10 +1103,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(-0.5 * var(foo))', + hasBOM: false, + id: '', + }, css: '-0.5 * var(foo)', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -973,10 +1133,15 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(-0.5 * var(foo))', + hasBOM: false, + id: '', + }, css: '-0.5 * var(foo)', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -1006,10 +1171,20 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 12, + context: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(-0.5 * var(foo))', + hasBOM: false, + id: '', + }, + css: '-0.5 * var(foo)', + lineInContext: 1, + }, css: 'foo', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -1032,10 +1207,15 @@ Generated by [AVA](https://ava.li). column: 11, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(-0.5 * var(foo))', + hasBOM: false, + id: '', + }, css: '-0.5 * var(foo)', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 8, @@ -1059,7 +1239,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'calc(-0.5 * var(foo))', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1099,10 +1279,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(1px + -2vw - 4px)', + hasBOM: false, + id: '', + }, css: '1px + -2vw - 4px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -1124,10 +1309,15 @@ Generated by [AVA](https://ava.li). column: 5, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(1px + -2vw - 4px)', + hasBOM: false, + id: '', + }, css: '1px + -2vw - 4px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 5, @@ -1148,10 +1338,15 @@ Generated by [AVA](https://ava.li). column: 7, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(1px + -2vw - 4px)', + hasBOM: false, + id: '', + }, css: '1px + -2vw - 4px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 7, @@ -1173,10 +1368,15 @@ Generated by [AVA](https://ava.li). column: 12, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(1px + -2vw - 4px)', + hasBOM: false, + id: '', + }, css: '1px + -2vw - 4px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 12, @@ -1197,10 +1397,15 @@ Generated by [AVA](https://ava.li). column: 14, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'calc(1px + -2vw - 4px)', + hasBOM: false, + id: '', + }, css: '1px + -2vw - 4px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 14, @@ -1226,7 +1431,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'calc(1px + -2vw - 4px)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1266,10 +1471,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'rgba( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -1291,10 +1501,15 @@ Generated by [AVA](https://ava.li). column: 4, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'rgba( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 4, @@ -1315,10 +1530,15 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'rgba( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -1340,10 +1560,15 @@ Generated by [AVA](https://ava.li). column: 10, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'rgba( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 10, @@ -1364,10 +1589,15 @@ Generated by [AVA](https://ava.li). column: 12, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 6, + context: Input { + css: 'rgba( 29, 439 , 29 )', + hasBOM: false, + id: '', + }, css: ' 29, 439 , 29 ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 12, @@ -1393,7 +1623,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'rgba( 29, 439 , 29 )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1434,10 +1664,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( "/gfx/img/bg.jpg" )', + hasBOM: false, + id: '', + }, css: ' "/gfx/img/bg.jpg" ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -1462,7 +1697,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url( "/gfx/img/bg.jpg" )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1503,10 +1738,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( "http://domain.com/gfx/img/bg.jpg" )', + hasBOM: false, + id: '', + }, css: ' "http://domain.com/gfx/img/bg.jpg" ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -1531,7 +1771,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url( "http://domain.com/gfx/img/bg.jpg" )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1572,10 +1812,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( \'/gfx/img/bg.jpg\' )', + hasBOM: false, + id: '', + }, css: ' \'/gfx/img/bg.jpg\' ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -1600,7 +1845,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url( \'/gfx/img/bg.jpg\' )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1641,10 +1886,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( \'http://domain.com/gfx/img/bg.jpg\' )', + hasBOM: false, + id: '', + }, css: ' \'http://domain.com/gfx/img/bg.jpg\' ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -1669,7 +1919,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url( \'http://domain.com/gfx/img/bg.jpg\' )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1709,10 +1959,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( /gfx/img/bg.jpg )', + hasBOM: false, + id: '', + }, css: ' /gfx/img/bg.jpg ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -1737,10 +1992,15 @@ Generated by [AVA](https://ava.li). column: 3, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( /gfx/img/bg.jpg )', + hasBOM: false, + id: '', + }, css: ' /gfx/img/bg.jpg ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 3, @@ -1761,10 +2021,15 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( /gfx/img/bg.jpg )', + hasBOM: false, + id: '', + }, css: ' /gfx/img/bg.jpg ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -1789,10 +2054,15 @@ Generated by [AVA](https://ava.li). column: 7, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( /gfx/img/bg.jpg )', + hasBOM: false, + id: '', + }, css: ' /gfx/img/bg.jpg ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 7, @@ -1813,10 +2083,15 @@ Generated by [AVA](https://ava.li). column: 10, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( /gfx/img/bg.jpg )', + hasBOM: false, + id: '', + }, css: ' /gfx/img/bg.jpg ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 10, @@ -1841,10 +2116,15 @@ Generated by [AVA](https://ava.li). column: 11, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url( /gfx/img/bg.jpg )', + hasBOM: false, + id: '', + }, css: ' /gfx/img/bg.jpg ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 11, @@ -1869,7 +2149,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url( /gfx/img/bg.jpg )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -1910,10 +2190,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url("/gfx/img/bg.jpg" hello )', + hasBOM: false, + id: '', + }, css: '"/gfx/img/bg.jpg" hello ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -1938,10 +2223,15 @@ Generated by [AVA](https://ava.li). column: 19, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url("/gfx/img/bg.jpg" hello )', + hasBOM: false, + id: '', + }, css: '"/gfx/img/bg.jpg" hello ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 19, @@ -1966,7 +2256,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url("/gfx/img/bg.jpg" hello )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2007,10 +2297,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url("http://domain.com/gfx/img/bg.jpg" hello )', + hasBOM: false, + id: '', + }, css: '"http://domain.com/gfx/img/bg.jpg" hello ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2035,10 +2330,15 @@ Generated by [AVA](https://ava.li). column: 36, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url("http://domain.com/gfx/img/bg.jpg" hello )', + hasBOM: false, + id: '', + }, css: '"http://domain.com/gfx/img/bg.jpg" hello ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 36, @@ -2063,7 +2363,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url("http://domain.com/gfx/img/bg.jpg" hello )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2272,10 +2572,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url(//123.example.com)', + hasBOM: false, + id: '', + }, css: '//123.example.com', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2300,7 +2605,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url(//123.example.com)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2344,10 +2649,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url(http://123.example.com)', + hasBOM: false, + id: '', + }, css: 'http://123.example.com', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2368,10 +2678,15 @@ Generated by [AVA](https://ava.li). column: 5, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url(http://123.example.com)', + hasBOM: false, + id: '', + }, css: 'http://123.example.com', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 5, @@ -2396,10 +2711,15 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url(http://123.example.com)', + hasBOM: false, + id: '', + }, css: 'http://123.example.com', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -2424,7 +2744,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'url(http://123.example.com)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2473,10 +2793,20 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: SubInput { + columnInContext: 5, + context: Input { + css: 'url(var(foo))', + hasBOM: false, + id: '', + }, + css: 'var(foo)', + lineInContext: 1, + }, css: 'foo', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2499,10 +2829,15 @@ Generated by [AVA](https://ava.li). column: 4, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'url(var(foo))', + hasBOM: false, + id: '', + }, css: 'var(foo)', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2570,10 +2905,15 @@ Generated by [AVA](https://ava.li). column: 3, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'var( --foo )', + hasBOM: false, + id: '', + }, css: ' --foo ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 3, @@ -2598,7 +2938,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'var( --foo )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2642,10 +2982,15 @@ Generated by [AVA](https://ava.li). column: 2, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'var( --foo)', + hasBOM: false, + id: '', + }, css: ' --foo', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 2, @@ -2670,7 +3015,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'var( --foo)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2714,10 +3059,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'var(--foo )', + hasBOM: false, + id: '', + }, css: '--foo ', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2742,7 +3092,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'var(--foo )', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2786,10 +3136,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'var(--foo)', + hasBOM: false, + id: '', + }, css: '--foo', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2814,7 +3169,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'var(--foo)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -2858,10 +3213,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'var(--foo, default-value)', + hasBOM: false, + id: '', + }, css: '--foo, default-value', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -2882,10 +3242,15 @@ Generated by [AVA](https://ava.li). column: 6, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'var(--foo, default-value)', + hasBOM: false, + id: '', + }, css: '--foo, default-value', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 6, @@ -2910,10 +3275,15 @@ Generated by [AVA](https://ava.li). column: 8, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 5, + context: Input { + css: 'var(--foo, default-value)', + hasBOM: false, + id: '', + }, css: '--foo, default-value', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 8, @@ -2938,7 +3308,7 @@ Generated by [AVA](https://ava.li). input: Input { css: 'var(--foo, default-value)', hasBOM: false, - id: '', + id: '', }, start: { column: 1, diff --git a/test/snapshots/func.test.js.snap b/test/snapshots/func.test.js.snap index da972ef3121652b027f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fv#XwZvx%2{t z->&)d&Y>l9vH?!|Sa*|bco`3cCdkOna?a_UR&CluUU6I+DnDfQ9lp$&8OcT{7%2~I&$6> zBvBq3tf7TI-ozaI_+6O$<4k!T20X9ou$42C$rBIXh57-&=~6P9wr01GY$;!lBkoJW zc3hj>vlfk!2P{(*U9(1xU_X-3cAU@vh{4jA%PxJT_5=yB^fMxQOXr&DTyGX!RIs$C zbIsspzVLTz&x%v3ZIyGX_u*lOliDGUC3LH4&DNyyr1h~VZ!haEm2D^yol;u7WTA$| zmb|$)tASH#>pGd7zZjYc1)|GZW%I8%kguGn`<*VW9KO2T&8q%W(R5;vSka6nH_io0zEe5 zJq!4FTLQ<{a!4&vJwiR%Z?>CW3+o~ppQTo>pd2O#!h_3!`&H zW!QK%?HInm#;%%@Jm0DJ#{VHs>_%nKtif2&*l@&Et; diff --git a/test/snapshots/interpolation.test.js.md b/test/snapshots/interpolation.test.js.md index b5bb0cb..b9e211c 100644 --- a/test/snapshots/interpolation.test.js.md +++ b/test/snapshots/interpolation.test.js.md @@ -30,10 +30,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 3, + context: Input { + css: '#{2 * 2px}', + hasBOM: false, + id: '', + }, css: '2 * 2px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -55,10 +60,15 @@ Generated by [AVA](https://ava.li). column: 3, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 3, + context: Input { + css: '#{2 * 2px}', + hasBOM: false, + id: '', + }, css: '2 * 2px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 3, @@ -79,10 +89,15 @@ Generated by [AVA](https://ava.li). column: 5, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 3, + context: Input { + css: '#{2 * 2px}', + hasBOM: false, + id: '', + }, css: '2 * 2px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 5, @@ -109,7 +124,7 @@ Generated by [AVA](https://ava.li). input: Input { css: '#{2 * 2px}', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -146,10 +161,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 3, + context: Input { + css: '#{2px}', + hasBOM: false, + id: '', + }, css: '2px', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, @@ -176,7 +196,7 @@ Generated by [AVA](https://ava.li). input: Input { css: '#{2px}', hasBOM: false, - id: '', + id: '', }, start: { column: 1, @@ -217,10 +237,15 @@ Generated by [AVA](https://ava.li). column: 1, line: 1, }, - input: Input { + input: SubInput { + columnInContext: 3, + context: Input { + css: '#{batman}', + hasBOM: false, + id: '', + }, css: 'batman', - hasBOM: false, - id: '', + lineInContext: 1, }, start: { column: 1, diff --git a/test/snapshots/interpolation.test.js.snap b/test/snapshots/interpolation.test.js.snap index 2c88906941c574422d8d4271a922de5e28479311..1c215ec4a74aaae546bcc262f87901959522b2dd 100644 GIT binary patch literal 1635 zcmV-p2AugpRzV3y|byS4+y5)l@M#*BxdN{EVthYI@xrr~MCz}nqV2@7y{p5bNJWhnWsn6hi*mb@$@Ky)8=M-8n5+ zH}9S%*sUIKmS%^IAws6^dGXce_4i+D-ZeD;iIl%duv@n~>~UB#$$GwGKaWZzLVazU zx>PfvCbyJp_EOJu{EdQfRE|(-fv&3ql;%E#LLox^gi=BqD4m<@q-@3CL9iEm4laOy zK$toM1v`?arl(VJ)r_T*)Dxj{XV*rp+YE=pga!$f32mhG5$MNL0rBC9$yASK5E{Y= zo?N4xR&_ODF6wHZVYj|s&?+0LjNYv=qlxA~TFZS2 z#tLU*r|cL;7^1}~6N*yirQ$aboCeoGqsI|DNuUkI`G9;TBoBcOu%49%isktQ>GRkN zf^-VZ6eP75Q9IuVo2@RbH>GPOe)SnzBG#RXr;>JyC!Bi#a(C1-oI62F_SlV=3L2$Y zGMzE)=F5f6hN2Obxh zOa+Uj`0ukjtcS1{46+>>T|3jqT&*W{+O{!)njT` zT+0iPv;$(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S_qp#f}SvSQZMha g+3bqY>lPHD*V)de-(|ArixWBjKfS*}AXOXy0N$tzegFUf From 0f73974cb7473f43f32e5d3c518fd6ff58e2ee7d Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 30 Mar 2020 17:31:08 -0700 Subject: [PATCH 08/10] Add a dependency and regenerate Ava headers --- package-lock.json | 9 +++++++++ package.json | 1 + test/snapshots/atword.test.js.md | 2 +- test/snapshots/comment.test.js.md | 2 +- test/snapshots/func.test.js.md | 2 +- test/snapshots/integration.test.js.md | 2 +- test/snapshots/interpolation.test.js.md | 2 +- test/snapshots/numeric.test.js.md | 2 +- test/snapshots/operator.test.js.md | 2 +- test/snapshots/punctuation.test.js.md | 2 +- test/snapshots/unicode-range.test.js.md | 2 +- test/snapshots/variable.test.js.md | 2 +- test/snapshots/word.test.js.md | 2 +- 13 files changed, 21 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 921bc1a..ba34905 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5161,6 +5161,15 @@ } } }, + "postcss-scss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.0.0.tgz", + "integrity": "sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, "postcss-value-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz", diff --git a/package.json b/package.json index a9dab4a..17dcda6 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "lint-staged": "^10.0.8", "nyc": "^15.0.0", "perfy": "^1.1.5", + "postcss-scss": "^2.0.0", "postcss-value-parser": "^4.0.0", "postcss-values-parser": "^3.0.3", "pre-commit": "^1.2.2", diff --git a/test/snapshots/atword.test.js.md b/test/snapshots/atword.test.js.md index e5c8980..2537d89 100644 --- a/test/snapshots/atword.test.js.md +++ b/test/snapshots/atword.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `atword.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## @word diff --git a/test/snapshots/comment.test.js.md b/test/snapshots/comment.test.js.md index 1d77c3e..9a02279 100644 --- a/test/snapshots/comment.test.js.md +++ b/test/snapshots/comment.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `comment.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## /**/ diff --git a/test/snapshots/func.test.js.md b/test/snapshots/func.test.js.md index 1fd0784..b0fe4fe 100644 --- a/test/snapshots/func.test.js.md +++ b/test/snapshots/func.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `func.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## -webkit-linear-gradient(0) diff --git a/test/snapshots/integration.test.js.md b/test/snapshots/integration.test.js.md index 7f822c2..7afaddc 100644 --- a/test/snapshots/integration.test.js.md +++ b/test/snapshots/integration.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `integration.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## manipulation diff --git a/test/snapshots/interpolation.test.js.md b/test/snapshots/interpolation.test.js.md index b9e211c..cd36124 100644 --- a/test/snapshots/interpolation.test.js.md +++ b/test/snapshots/interpolation.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `interpolation.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## #{2 * 2px} diff --git a/test/snapshots/numeric.test.js.md b/test/snapshots/numeric.test.js.md index a853e2b..2343849 100644 --- a/test/snapshots/numeric.test.js.md +++ b/test/snapshots/numeric.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `numeric.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## +2 diff --git a/test/snapshots/operator.test.js.md b/test/snapshots/operator.test.js.md index 7590e21..4ca4118 100644 --- a/test/snapshots/operator.test.js.md +++ b/test/snapshots/operator.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `operator.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## 10 % modulo diff --git a/test/snapshots/punctuation.test.js.md b/test/snapshots/punctuation.test.js.md index 6403a37..4144b14 100644 --- a/test/snapshots/punctuation.test.js.md +++ b/test/snapshots/punctuation.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `punctuation.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## (1,2) diff --git a/test/snapshots/unicode-range.test.js.md b/test/snapshots/unicode-range.test.js.md index 300d794..3593fbd 100644 --- a/test/snapshots/unicode-range.test.js.md +++ b/test/snapshots/unicode-range.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `unicode-range.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## U+0-7F diff --git a/test/snapshots/variable.test.js.md b/test/snapshots/variable.test.js.md index 8f0848f..3dc1b5f 100644 --- a/test/snapshots/variable.test.js.md +++ b/test/snapshots/variable.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `variable.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## $batman diff --git a/test/snapshots/word.test.js.md b/test/snapshots/word.test.js.md index 973d83b..0cd9c26 100644 --- a/test/snapshots/word.test.js.md +++ b/test/snapshots/word.test.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `word.test.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## \"word\" \s From 9e5e9855672b05ad65f54065443c607058eb38d6 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 30 Mar 2020 17:35:57 -0700 Subject: [PATCH 09/10] Add tests --- lib/index.js | 4 +- test/errors.test.js | 79 ++++++++++ test/fixtures/errors.js | 18 +++ test/snapshots/errors.test.js.md | 226 +++++++++++++++++++++++++++++ test/snapshots/errors.test.js.snap | Bin 0 -> 1461 bytes 5 files changed, 325 insertions(+), 2 deletions(-) create mode 100644 test/errors.test.js create mode 100644 test/fixtures/errors.js create mode 100644 test/snapshots/errors.test.js.md create mode 100644 test/snapshots/errors.test.js.snap diff --git a/lib/index.js b/lib/index.js index 11431cf..c57bdeb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -91,9 +91,9 @@ module.exports = { parseAtRuleParams(rule, options) { const { line, column } = positionAfter(rule, ['@', rule.name, rule.raws.afterName]); - return module.exports.parse(rule.value, { + return module.exports.parse(rule.params, { ...options, - context: rule, + context: rule.source.input, lineInContext: line, columnInContext: column }); diff --git a/test/errors.test.js b/test/errors.test.js new file mode 100644 index 0000000..fb5245d --- /dev/null +++ b/test/errors.test.js @@ -0,0 +1,79 @@ +/* + Copyright © 2020 Andrew Powell + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of this Source Code Form. +*/ +const test = require('ava'); + +const postcss = require('postcss'); +const scss = require('postcss-scss'); + +const { parse, parseDeclValue, parseAtRuleParams } = require('../lib'); + +const { throws, functionCall } = require('./fixtures/errors'); + +function snapshotError(t, callback) { + try { + callback(); + throw Error('Expected an error.'); + } catch (error) { + if (!('showSourceCode' in error)) { + throw error; + } + + t.snapshot(error); + t.snapshot(error.showSourceCode(false)); + } +} + +test(throws.decl, (t) => { + const root = postcss.parse(throws.decl, { + from: 'file:///fixtures/errors.js' + }); + snapshotError(t, () => parseDeclValue(root.nodes[0].nodes[0])); +}); + +test(throws.atRule, (t) => { + const root = postcss.parse(throws.atRule, { + from: 'file:///fixtures/errors.js' + }); + snapshotError(t, () => parseAtRuleParams(root.nodes[0])); +}); + +test(throws.interpolation, (t) => { + const root = scss.parse(throws.interpolation, { + from: 'file:///fixtures/errors.js' + }); + + const [decl] = root.nodes[0].nodes; + snapshotError(t, () => + parse(decl.prop, { + interpolation: { prefix: '#' }, + context: root.source.input, + lineInContext: decl.source.start.line, + columnInContext: decl.source.start.column + }) + ); +}); + +test(functionCall, (t) => { + const root = scss.parse(functionCall, { + from: 'file:///fixtures/errors.js' + }); + + const value = parseDeclValue(root.nodes[0].nodes[0]); + value.walk((node) => { + delete node.parent; // eslint-disable-line no-param-reassign + }); + + snapshotError(t, () => + value.walkFuncs((func) => { + if (func.name === 'var') throw func.error('Undefined variable!'); + }) + ); +}); diff --git a/test/fixtures/errors.js b/test/fixtures/errors.js new file mode 100644 index 0000000..1370359 --- /dev/null +++ b/test/fixtures/errors.js @@ -0,0 +1,18 @@ +/* + Copyright © 2020 Andrew Powell + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of this Source Code Form. +*/ +module.exports = { + throws: { + decl: 'a {\n b: +-2.;\n}', + atRule: '@foo +-2. {\n a {\n b: c;\n }\n}', + interpolation: 'a {\n background-#{+-2.}: white;\n}' + }, + functionCall: 'p {\n color: rgb(var(--some-color) / 70%);\n}' +}; diff --git a/test/snapshots/errors.test.js.md b/test/snapshots/errors.test.js.md new file mode 100644 index 0000000..e6dd4cd --- /dev/null +++ b/test/snapshots/errors.test.js.md @@ -0,0 +1,226 @@ +# Snapshot report for `test/errors.test.js` + +The actual snapshot is saved in `errors.test.js.snap`. + +Generated by [AVA](https://avajs.dev). + +## @foo +-2. { + a { + b: c; + } +} + +> Snapshot 1 + + CssSyntaxError { + column: 6, + file: 'file:///fixtures/errors.js', + input: { + column: 6, + file: 'file:///fixtures/errors.js', + line: 1, + source: `@foo +-2. {␊ + a {␊ + b: c;␊ + }␊ + }`, + }, + line: 1, + reason: 'Unknown word', + source: `@foo +-2. {␊ + a {␊ + b: c;␊ + }␊ + }`, + message: 'file:///fixtures/errors.js:1:6: Unknown word', + } + +> Snapshot 2 + + `> 1 | @foo +-2. {␊ + | ^␊ + 2 | a {␊ + 3 | b: c;` + +## a { + b: +-2.; +} + +> Snapshot 1 + + CssSyntaxError { + column: 6, + file: 'file:///fixtures/errors.js', + input: { + column: 6, + file: 'file:///fixtures/errors.js', + line: 2, + source: `a {␊ + b: +-2.;␊ + }`, + }, + line: 2, + reason: 'Unknown word', + source: `a {␊ + b: +-2.;␊ + }`, + message: 'file:///fixtures/errors.js:2:6: Unknown word', + } + +> Snapshot 2 + + ` 1 | a {␊ + > 2 | b: +-2.;␊ + | ^␊ + 3 | }` + +## a { + background-#{+-2.}: white; +} + +> Snapshot 1 + + CssSyntaxError { + column: 16, + file: 'file:///fixtures/errors.js', + input: { + column: 16, + file: 'file:///fixtures/errors.js', + line: 2, + source: `a {␊ + background-#{+-2.}: white;␊ + }`, + }, + line: 2, + reason: 'Unknown word', + source: `a {␊ + background-#{+-2.}: white;␊ + }`, + message: 'file:///fixtures/errors.js:2:16: Unknown word', + } + +> Snapshot 2 + + ` 1 | a {␊ + > 2 | background-#{+-2.}: white;␊ + | ^␊ + 3 | }` + +## p { + color: rgb(var(--some-color) / 70%); +} + +> Snapshot 1 + + CssSyntaxError { + column: 14, + file: 'file:///fixtures/errors.js', + input: { + column: 14, + file: 'file:///fixtures/errors.js', + line: 2, + source: `p {␊ + color: rgb(var(--some-color) / 70%);␊ + }`, + }, + line: 2, + postcssNode: Func { + indexes: {}, + isColor: false, + isVar: true, + lastEach: 1, + name: 'var', + nodes: [ + Word { + isColor: false, + isHex: false, + isUrl: false, + isVariable: true, + raws: { + after: '', + before: '', + }, + source: { + end: { + column: 1, + line: 1, + }, + input: SubInput { + columnInContext: 5, + context: SubInput { + columnInContext: 5, + context: SubInput { + columnInContext: 10, + context: Input { + css: `p {␊ + color: rgb(var(--some-color) / 70%);␊ + }`, + file: 'file:///fixtures/errors.js', + hasBOM: false, + }, + css: 'rgb(var(--some-color) / 70%)', + lineInContext: 2, + }, + css: 'var(--some-color) / 70%', + lineInContext: 1, + }, + css: '--some-color', + lineInContext: 1, + }, + start: { + column: 1, + line: 1, + }, + }, + type: 'word', + value: '--some-color', + }, + ], + params: '(--some-color)', + raws: { + after: '', + before: '', + semicolon: false, + }, + source: { + end: { + column: 4, + line: 1, + }, + input: SubInput { + columnInContext: 5, + context: SubInput { + columnInContext: 10, + context: Input { + css: `p {␊ + color: rgb(var(--some-color) / 70%);␊ + }`, + file: 'file:///fixtures/errors.js', + hasBOM: false, + }, + css: 'rgb(var(--some-color) / 70%)', + lineInContext: 2, + }, + css: 'var(--some-color) / 70%', + lineInContext: 1, + }, + start: { + column: 1, + line: 1, + }, + }, + type: 'func', + }, + reason: 'Undefined variable!', + source: `p {␊ + color: rgb(var(--some-color) / 70%);␊ + }`, + message: 'file:///fixtures/errors.js:2:14: Undefined variable!', + } + +> Snapshot 2 + + ` 1 | p {␊ + > 2 | color: rgb(var(--some-color) / 70%);␊ + | ^␊ + 3 | }` diff --git a/test/snapshots/errors.test.js.snap b/test/snapshots/errors.test.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..ac2338bbfe4871e0075b23b78a2d4925dcfbc76e GIT binary patch literal 1461 zcmV;m1xorsRzVx~(m#KXbY1!IgSQUyoc+^y2cH6SLSXsU0(thTxPJGg z#rHnr>Fj{$U=BFd`TPFyqdLk+KI}W@JdeWY0Xk{`wc@k+KInx zj*vDY(yK@$!jTq^1UM45mv;~!N5nSbPw46Fq(+AV@iTXYu~b?u3^v+>STq_POXaMr zp_)yRT;;ILnv^CRNi^#*6mbD~A#5i}lB3_oF2uUPfSxz-?eN zGQXF%GXS>zhvLW8gk>iqe_5bectAAQ&u0yiifR+NHWHQPUip-4+YHKmxGJ&4HJ!lk z4GeZ*Fk7!wk3FnX{kRdSlKUprO;3;MI^~sS!^sKdI$;w%yC&`SdTRGaMEVnO57-Ia z9)1Y5TSjoBthvM-8>C`(FLG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ATCH 10/10] Fix lints --- lib/SubInput.js | 4 ++-- lib/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/SubInput.js b/lib/SubInput.js index abffe4c..3c2030e 100644 --- a/lib/SubInput.js +++ b/lib/SubInput.js @@ -23,7 +23,7 @@ module.exports = class SubInput { let lineInContext; let columnInContext; if (line === 1) { - lineInContext = this.lineInContext; + lineInContext = this.lineInContext; // eslint-disable-line prefer-destructuring columnInContext = column + this.columnInContext - 1; } else { lineInContext = this.lineInContext + line - 1; @@ -37,7 +37,7 @@ module.exports = class SubInput { let lineInContext; let columnInContext; if (line === 1) { - lineInContext = this.lineInContext; + lineInContext = this.lineInContext; // eslint-disable-line prefer-destructuring columnInContext = column + this.columnInContext - 1; } else { lineInContext = this.lineInContext + line - 1; diff --git a/lib/index.js b/lib/index.js index c57bdeb..504a28f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -41,8 +41,8 @@ function positionAfter(node, chunks) { } module.exports = { - parse(css, options) { - if (!options) options = {}; + parse(css, opts) { + const options = opts || {}; let input; if (options.context) {