MCPcopy Create free account
hub / github.com/d1ll0n/stack-packer / parseMember

Function parseMember

src/parser/parser.ts:52–59  ·  view source on GitHub ↗
(scopeName: string, member: VariableDeclaration, defaultCoderType: CoderType)

Source from the content-addressed store, hash-verified

50 * @member name Name of the field in the struct
51 */
52export function parseMember(scopeName: string, member: VariableDeclaration, defaultCoderType: CoderType): StructField {
53 const { typeName, name, coderType } = member;
54 const accessors = member.accessors && {
55 getterCoderType: member.accessors.getterCoderType,
56 setterCoderType: member.accessors.setterCoderType,
57 }
58 return { typeName: parseTypeName(scopeName, typeName), name, coderType: coderType || defaultCoderType, accessors };
59}
60
61export function parseStruct(scopeName: string, subNode: StructDefinition): StructType {
62 const {type, name, members, coderType} = subNode;

Callers 4

parseStructFunction · 0.85
parseErrorFunction · 0.85
parseEventFunction · 0.85
parseFunctionFunction · 0.85

Calls 1

parseTypeNameFunction · 0.85

Tested by

no test coverage detected