File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import { prettierVersionSatisfies } from './prettier-version-satisfies.js';
33import { locEnd } from './loc.js' ;
44
55import type { AstPath } from 'prettier' ;
6- import type { utilV2 } from './types' ;
7- import type { AstNode , CollectionNode } from '../slang-nodes' ;
6+ import type { utilV2 } from './types.d.ts ' ;
7+ import type { AstNode , CollectionNode } from '../slang-nodes/index.d.ts ' ;
88
99export const isPrettier2 = prettierVersionSatisfies ( '^2.3.0' ) ;
1010
Original file line number Diff line number Diff line change 1- import {
2- NonterminalKind ,
3- TerminalKind
4- } from '@nomicfoundation/slang/kinds/index.js' ;
1+ import { NonterminalKind , TerminalKind } from '@nomicfoundation/slang/cst' ;
52import { isBinaryOperation } from './is-binary-operation.js' ;
63import { Expression } from '../slang-nodes/Expression.js' ;
74import { TupleExpression } from '../slang-nodes/TupleExpression.js' ;
Original file line number Diff line number Diff line change 1- import type { Node } from '@nomicfoundation/slang/cst' ;
21import type {
2+ Node ,
33 NonterminalKind ,
44 TerminalKind
5- } from '@nomicfoundation/slang/kinds ' ;
6- import type { StrictAstNode } from '../slang-nodes' ;
5+ } from '@nomicfoundation/slang/cst ' ;
6+ import type { StrictAstNode } from '../slang-nodes/index.d.ts ' ;
77
88export function createKindCheckFunction (
99 kindsArray : ( keyof typeof TerminalKind | keyof typeof NonterminalKind ) [ ]
Original file line number Diff line number Diff line change 1- import { NonterminalKind } from '@nomicfoundation/slang/kinds/index.js ' ;
1+ import { NonterminalKind } from '@nomicfoundation/slang/cst ' ;
22import { createKindCheckFunction } from './create-kind-check-function.js' ;
33
4- import type { BinaryOperation , StrictAstNode } from '../slang-nodes' ;
4+ import type { BinaryOperation , StrictAstNode } from '../slang-nodes/index.d.ts ' ;
55
66export const isBinaryOperation = createKindCheckFunction ( [
77 NonterminalKind . AdditiveExpression ,
Original file line number Diff line number Diff line change 1- import { TerminalKind } from '@nomicfoundation/slang/kinds/index.js ' ;
1+ import { TerminalKind } from '@nomicfoundation/slang/cst ' ;
22import { createKindCheckFunction } from './create-kind-check-function.js' ;
33
44import type { Node } from '@nomicfoundation/slang/cst' ;
5- import type { AstNode , BlockComment , Comment } from '../slang-nodes' ;
5+ import type { AstNode , BlockComment , Comment } from '../slang-nodes/index.d.ts ' ;
66
77export const isBlockComment = createKindCheckFunction ( [
88 TerminalKind . MultiLineComment ,
Original file line number Diff line number Diff line change 1- import { BlockComment } from '../slang-nodes' ;
1+ import type { BlockComment } from '../slang-nodes/index.d.ts ' ;
22
33export function isIndentableBlockComment ( comment : BlockComment ) : boolean {
44 // If the comment has multiple lines and every line starts with a star
Original file line number Diff line number Diff line change 1- import type { AstNode } from '../slang-nodes' ;
1+ import type { AstNode } from '../slang-nodes/index.d.ts ' ;
22
33export function locStart ( node : AstNode ) : number {
44 if ( typeof node === 'string' || typeof node === 'undefined' ) return - 1 ;
Original file line number Diff line number Diff line change 1- import { NonterminalKind } from '@nomicfoundation/slang/kinds/index.js ' ;
1+ import { NonterminalKind } from '@nomicfoundation/slang/cst ' ;
22
3- import type { SortableAttribute } from './types' ;
3+ import type { SortableAttribute } from './types.d.ts ' ;
44
55const visibilityKeyWords = new Set ( [
66 'external' ,
Original file line number Diff line number Diff line change 11import type { util } from 'prettier' ;
2- import type { ConstructorAttribute } from '../slang-nodes/ConstructorAttribute' ;
3- import type { FallbackFunctionAttribute } from '../slang-nodes/FallbackFunctionAttribute' ;
4- import type { FunctionAttribute } from '../slang-nodes/FunctionAttribute' ;
5- import type { FunctionTypeAttribute } from '../slang-nodes/FunctionTypeAttribute' ;
6- import type { ModifierAttribute } from '../slang-nodes/ModifierAttribute' ;
7- import type { ReceiveFunctionAttribute } from '../slang-nodes/ReceiveFunctionAttribute' ;
8- import type { StateVariableAttribute } from '../slang-nodes/StateVariableAttribute' ;
9- import type { UnnamedFunctionAttribute } from '../slang-nodes/UnnamedFunctionAttribute' ;
10- import type { AstNode } from '../slang-nodes' ;
2+ import type { ConstructorAttribute } from '../slang-nodes/ConstructorAttribute.ts ' ;
3+ import type { FallbackFunctionAttribute } from '../slang-nodes/FallbackFunctionAttribute.ts ' ;
4+ import type { FunctionAttribute } from '../slang-nodes/FunctionAttribute.ts ' ;
5+ import type { FunctionTypeAttribute } from '../slang-nodes/FunctionTypeAttribute.ts ' ;
6+ import type { ModifierAttribute } from '../slang-nodes/ModifierAttribute.ts ' ;
7+ import type { ReceiveFunctionAttribute } from '../slang-nodes/ReceiveFunctionAttribute.ts ' ;
8+ import type { StateVariableAttribute } from '../slang-nodes/StateVariableAttribute.ts ' ;
9+ import type { UnnamedFunctionAttribute } from '../slang-nodes/UnnamedFunctionAttribute.ts ' ;
10+ import type { AstNode } from '../slang-nodes/index.d.ts ' ;
1111
1212type SortableAttribute =
1313 | ConstructorAttribute
You can’t perform that action at this time.
0 commit comments