MCPcopy Index your code
hub / github.com/processing/p5.js / VariableDeclarator

Function VariableDeclarator

src/core/friendly_errors/sketch_verifier.js:89–99  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

87
88 walk(ast, {
89 VariableDeclarator(node) {
90 if (node.id.type === 'Identifier') {
91 const category = node.init && ['ArrowFunctionExpression', 'FunctionExpression'].includes(node.init.type)
92 ? 'functions'
93 : 'variables';
94 userDefinitions[category].push({
95 name: node.id.name,
96 line: node.loc.start.line + lineOffset
97 });
98 }
99 },
100 FunctionDeclaration(node) {
101 if (node.id && node.id.type === 'Identifier') {
102 userDefinitions.functions.push({

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected