Skip to content

Commit

Permalink
chore(): tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
SStranks committed Nov 4, 2023
1 parent c7b2ea9 commit 733bb34
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/services/selectorPrinting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,13 @@ export class SelectorPrinting {
}

// Edge case: 'n' without integer prefix A, with B integer non-existent, is not regarded as a binary expression token.
const scanner = new Scanner();
const parser = new Parser();
const pseudoSelectorText = childElements[1].getText();
scanner.setSource(pseudoSelectorText);
const firstToken = scanner.scan();
const secondToken = scanner.scan();
parser.scanner.setSource(pseudoSelectorText);
const firstToken = parser.scanner.scan();
const secondToken = parser.scanner.scan();

if (firstToken.text === 'n' || firstToken.text === '-n' && secondToken.text === 'of') {
const parser = new Parser();
const complexSelectorListNodes: nodes.Node[] = [];
const complexSelectorText = pseudoSelectorText.slice(secondToken.offset + 2);
const complexSelectorArray = complexSelectorText.split(',');
Expand Down

0 comments on commit 733bb34

Please sign in to comment.