MCPcopy Create free account
hub / github.com/CashScript/cashscript / visitSourceFile

Method visitSourceFile

packages/cashc/src/ast/AstBuilder.ts:108–117  ·  view source on GitHub ↗
(ctx: SourceFileContext)

Source from the content-addressed store, hash-verified

106 }
107
108 visitSourceFile(ctx: SourceFileContext): SourceFileNode {
109 ctx.pragmaDirective_list().forEach((pragma) => {
110 this.processPragma(pragma);
111 });
112
113 const contract = this.visit(ctx.contractDefinition()) as ContractNode;
114 const sourceFileNode = new SourceFileNode(contract);
115 sourceFileNode.location = Location.fromCtx(ctx);
116 return sourceFileNode;
117 }
118
119 processPragma(ctx: PragmaDirectiveContext): void {
120 const pragmaName = getPragmaName(ctx.pragmaName().getText());

Callers 1

acceptMethod · 0.45

Calls 4

processPragmaMethod · 0.95
pragmaDirective_listMethod · 0.80
fromCtxMethod · 0.80
contractDefinitionMethod · 0.45

Tested by

no test coverage detected