Skip to content

Upstream tracking: ctags loses property keys for function-valued object literals in JavaScript #2162

Description

@squid-protocol

Description

During a tri-comparison ledger sweep, we identified a persistent parser limitation in universal-ctags for JavaScript.

When a function-valued object literal is passed as a call argument rather than a direct assignment, ctags emits a synthetic AnonymousFunction<hex> tag instead of using the real property key (e.g., ajaxSetup in jQuery.extend(..., {ajaxSetup: function(){}})).

GitGalaxy and tree-sitter both correctly attribute the property key as the function name.

Scope

  • Occurs extensively in jquery/core.js, jquery/ajax.js, threejs/WebGLRenderer.js, etc.
  • Accounts for ~265 discrepancy shapes where GitGalaxy and tree-sitter agree against ctags.

Action

This is an upstream ctags limitation. We have already added a doc note to ctags_reader.py's javascript CTAGS_FUNC_KINDS entry. Tracking here for visibility.

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

    core-engineModifications to the central physics and parsing enginetestingUnit, integration, and E2E pipeline verification

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions