UNPKG

prettier-plugin-solidity

Version:

A Prettier Plugin for automatically formatting your Solidity code.

26 lines 610 B
import { doc } from 'prettier'; const { group, line, indent } = doc.builders; export const assignment = { match: (op) => [ '=', '|=', '^=', '&=', '<<=', '>>=', '+=', '-=', '*=', '/=', '%=' ].includes(op), print: (node, path, print) => [ path.call(print, 'left'), ' ', node.operator, node.right.type === 'BinaryOperation' ? group(indent([line, path.call(print, 'right')])) : [' ', path.call(print, 'right')] ] }; //# sourceMappingURL=assignment.js.map