UNPKG

prettier-plugin-solidity

Version:

A Prettier Plugin for automatically formatting your Solidity code.

18 lines 1.07 kB
import { NonterminalKind } from '@nomicfoundation/slang/cst'; import addCollectionNodeFirstComment from './add-collection-node-first-comment.js'; import addCollectionNodeLastComment from './add-collection-node-last-comment.js'; export default function handlePositionalArgumentsDeclarationComments({ precedingNode, enclosingNode, followingNode, comment }) { if ((enclosingNode === null || enclosingNode === void 0 ? void 0 : enclosingNode.kind) !== NonterminalKind.PositionalArgumentsDeclaration) { return false; } if ((precedingNode === null || precedingNode === void 0 ? void 0 : precedingNode.kind) === NonterminalKind.PositionalArguments) { addCollectionNodeLastComment(precedingNode, comment); return true; } if ((followingNode === null || followingNode === void 0 ? void 0 : followingNode.kind) === NonterminalKind.PositionalArguments) { addCollectionNodeFirstComment(followingNode, comment); return true; } return false; } //# sourceMappingURL=handle-positional-arguments-declaration-comments.js.map