11"use strict" ;
22
3- const utilShared = require ( "prettier" ) . util ;
4- const util = require ( "./_util-from-prettier" ) ;
3+ const util = require ( "prettier" ) . util ;
54const parse = require ( "./parser" ) ;
65const print = require ( "./printer" ) ;
76
@@ -43,9 +42,7 @@ function locStart(node) {
4342 return node . start ;
4443 }
4544 if ( node . source ) {
46- return (
47- utilShared . lineColumnToIndex ( node . source . start , node . source . input . css ) - 1
48- ) ;
45+ return util . lineColumnToIndex ( node . source . start , node . source . input . css ) - 1 ;
4946 }
5047 if ( node . loc ) {
5148 return node . loc . start ;
@@ -55,7 +52,7 @@ function locStart(node) {
5552function locEnd ( node ) {
5653 // This function is copied from the code that used to live in the main prettier repo.
5754
58- const endNode = node . nodes && utilShared . getLast ( node . nodes ) ;
55+ const endNode = node . nodes && util . getLast ( node . nodes ) ;
5956 if ( endNode && node . source && ! node . source . end ) {
6057 node = endNode ;
6158 }
@@ -66,7 +63,7 @@ function locEnd(node) {
6663 } else if ( typeof node . end === "number" ) {
6764 loc = node . end ;
6865 } else if ( node . source ) {
69- loc = utilShared . lineColumnToIndex ( node . source . end , node . source . input . css ) ;
66+ loc = util . lineColumnToIndex ( node . source . end , node . source . input . css ) ;
7067 }
7168
7269 if ( node . __location ) {
@@ -136,7 +133,6 @@ function clean(ast, newObj) {
136133const printers = {
137134 python : {
138135 print,
139- hasPrettierIgnore : util . hasIgnoreComment ,
140136 printComment,
141137 canAttachComment,
142138 massageAstNode : clean
0 commit comments