Skip to content

Commit d6efc16

Browse files
committed
only StrictAstNode, Identifier, or YulIdentifier can have comments attached
1 parent 7f6df83 commit d6efc16

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/slang-comments/handlers/add-collection-first-comment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { util } from 'prettier';
22

3-
import type { Comment, Collection } from '../../slang-nodes/types.d.ts';
3+
import type { Comment, NodeCollection } from '../../slang-nodes/types.d.ts';
44

55
const { addDanglingComment, addLeadingComment } = util;
66

77
export default function addCollectionFirstComment(
8-
node: Collection,
8+
node: NodeCollection,
99
comment: Comment
1010
): void {
1111
if (node.items.length === 0) {

src/slang-comments/handlers/add-collection-last-comment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { util } from 'prettier';
22

3-
import type { Comment, Collection } from '../../slang-nodes/types.d.ts';
3+
import type { Comment, NodeCollection } from '../../slang-nodes/types.d.ts';
44

55
const { addDanglingComment, addTrailingComment } = util;
66

77
export default function addCollectionLastComment(
8-
node: Collection,
8+
node: NodeCollection,
99
comment: Comment
1010
): void {
1111
if (node.items.length === 0) {

0 commit comments

Comments
 (0)