Skip to content

Commit 51d8d73

Browse files
committed
comment and remove needless param
1 parent 99ace2b commit 51d8d73

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/cmd/info.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default async function cmdInfo(args: InfoArgs) {
1414

1515
const agg = aggregateImports(p);
1616
const block = createBlock(...agg.rest);
17-
const analysis = analyzeBlock(block, { nest: true });
17+
const analysis = analyzeBlock(block);
1818
resolveConst(agg, analysis);
1919

2020
console.info('analysis:', analysis.vars);

lib/internal/analyze/block.ts

+5
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ export type AnalyzeBlock = {
190190
hasAwait: boolean;
191191
};
192192

193+
/**
194+
* Analyze a block for its variable interactions.
195+
*
196+
* The `nest` argument is default `true`.
197+
*/
193198
export function analyzeBlock(b: acorn.BlockStatement, args?: { nest?: boolean }): AnalyzeBlock {
194199
const out: AnalyzeBlock = { vars: new Map(), hasNested: false, hasAwait: false };
195200
const mark: MarkIdentifierFn = (name, arg) => {

0 commit comments

Comments
 (0)