prettier-plugin-solidity
Version:
A Prettier Plugin for automatically formatting your Solidity code.
24 lines • 592 B
JavaScript
import { doc } from 'prettier';
import { printAssignmentRightSide } from '../common/printer-helpers.js';
const { group, line, indent } = doc.builders;
export const assignment = {
match: (op) => [
'=',
'|=',
'^=',
'&=',
'<<=',
'>>=',
'+=',
'-=',
'*=',
'/=',
'%='
].includes(op),
print: (node, path, print) => [
path.call(print, 'left'),
` ${node.operator}`,
printAssignmentRightSide(path.call(print, 'right'), node.right)
]
};
//# sourceMappingURL=assignment.js.map