Skip to content

Code outside a named function is never scanned #138

Description

@jbrown9513

methodsOf in src/analysis.js scans only declarations whose name is not <anonymous>. An exported arrow named by its assignment has name: <anonymous> and qualified_name: module.exports.validateInput and is skipped (#125). Anonymous callbacks (#123), a module whose export is an expression (#129) and a file whose functions come from a macro invocation (#130) have no named declaration and get no reading at all.

Scan by qualified_name when an assignment names an anonymous function. Give each file one unit for its top-level code so a file with no named function is still read.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: parsertree-sitter grammars, declarations, references, and the call grapharea: scannerSource selection, analysis, localization, and scan behaviorbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions