MCPcopy
hub / github.com/witheve/Eve / scan

Method scan

src/runtime/analyzer.ts:49–74  ·  view source on GitHub ↗
(parseNode: any, scopes: string[], entity: any, attribute: string, value: any)

Source from the content-addressed store, hash-verified

47 }
48
49 scan(parseNode: any, scopes: string[], entity: any, attribute: string, value: any) {
50 let changes = this.changes;
51 let scanId = parseNode.id;
52 let [start, stop] = nodeToBoundaries(parseNode, this.block.start);
53 changes.store("session", scanId, "tag", "scan", "analyzer");
54 changes.store("session", scanId, "block", this.block.id, "analyzer");
55 changes.store("session", scanId, "start", start, "analyzer");
56 changes.store("session", scanId, "stop", stop, "analyzer");
57 changes.store("session", scanId, "entity", entity.id, "analyzer");
58 if(attribute !== undefined) {
59 changes.store("session", scanId, "attribute", attribute, "analyzer");
60 }
61 if(parseNode.buildId !== undefined) {
62 changes.store("session", scanId, "build-node", parseNode.buildId, "analyzer");
63 }
64 if(value && value.id !== undefined) {
65 changes.store("session", scanId, "value", value.id, "analyzer");
66 changes.store("session", value.id, "tag", "variable", "analyzer");
67 } else if(value !== undefined) {
68 changes.store("session", scanId, "value", value, "analyzer");
69 }
70 for(let scope of scopes) {
71 changes.store("session", scanId, "scopes", scope, "analyzer");
72 }
73 return scanId;
74 }
75
76 provide(parseNode: any, scopes: string[], entity: any, attribute: string, value: any) {
77 let changes = this.changes;

Callers 2

_scanRecordMethod · 0.45
_scanScanMethod · 0.45

Calls 2

nodeToBoundariesFunction · 0.90
storeMethod · 0.45

Tested by

no test coverage detected