UNPKG

prettier-plugin-solidity

Version:

A Prettier Plugin for automatically formatting your Solidity code.

19 lines 854 B
import { NonterminalKind } from '@nomicfoundation/slang/cst'; import { getNodeMetadata, updateMetadata } from '../slang-utils/metadata.js'; import { Expression } from './Expression.js'; import { CallOptions } from './CallOptions.js'; export class CallOptionsExpression { constructor(ast, options) { this.kind = NonterminalKind.CallOptionsExpression; let metadata = getNodeMetadata(ast); this.operand = new Expression(ast.operand, options); this.options = new CallOptions(ast.options, options); metadata = updateMetadata(metadata, [this.operand, this.options]); this.comments = metadata.comments; this.loc = metadata.loc; } print(path, print) { return [path.call(print, 'operand'), '{', path.call(print, 'options'), '}']; } } //# sourceMappingURL=CallOptionsExpression.js.map