prettier-plugin-solidity
Version:
A Prettier Plugin for automatically formatting your Solidity code.
23 lines • 866 B
JavaScript
import { NonterminalKind } from '@nomicfoundation/slang/cst';
import { joinExisting } from '../slang-utils/join-existing.js';
import { SlangNode } from './SlangNode.js';
import { StorageLocation } from './StorageLocation.js';
import { TerminalNode } from './TerminalNode.js';
export class UntypedTupleMember extends SlangNode {
constructor(ast) {
super(ast);
this.kind = NonterminalKind.UntypedTupleMember;
if (ast.storageLocation) {
this.storageLocation = new StorageLocation(ast.storageLocation);
}
this.name = new TerminalNode(ast.name);
this.updateMetadata(this.storageLocation);
}
print(path, print) {
return joinExisting(' ', [
path.call(print, 'storageLocation'),
path.call(print, 'name')
]);
}
}
//# sourceMappingURL=UntypedTupleMember.js.map