Expand description
Julia language parser.
Backed by the official tree-sitter/tree-sitter-julia grammar (0.23).
Julia has no per-file namespace: module coordinates come from
module X … end blocks, and files are stitched together textually via
include("relative/path.jl"). That split drives the import model:
include("…")is a file path — recorded verbatim inFileInfo.importsand resolved by the builder’s path-import route (registry::uses_path_imports("julia")), which checks candidates against the real file set and so cannot invent a target.using Foo/import Foo.Barare module references — recorded as their dotted text so the dependency is visible on the File node, but they are namespace-shaped: julia is deliberately NOT in the file-anchored allowlist ofother_edges.rs’s raw prefix walk, so ausingof an external package whose name collides with a project file can never manufacture a File→File edge.
Coverage:
function f() … end, short-formf(x) = …(anassignmentwhose LHS is a call),function foo endstubs, typed (f(x)::T = …) andwhere-clause signatures → FunctionInfo. Multiple dispatch (same name, different signatures) is preserved by the builder’s overload pass, which decorates colliding qualified names with a signature hash.- Qualified extension methods (
function Base.show(io, x) … end) keep the leaf name (show), so same-file calls resolve to them. struct/mutable struct→ ClassInfo kind=“struct” (Structnodes) with fields (typed, untyped, defaulted) as AttributeInfo;abstract type→ ClassInfo kind=“abstract_type”;<:supertypes →extendsTypeRelationships (EXTENDS edges).module X … end→ members qualified as<file-module>.X.<name>; top-level modules are recorded as submodule declarations (Module HAS_SUBMODULE Module).const NAME = …→ ConstantInfo;export a, b→ FileInfo.exports.- Call sites (identifier and
receiver.methodfield calls) → FunctionInfo.calls; cyclomatic branch metrics; docstrings from the immediately preceding string literal; TODO/FIXME comment annotations. - One level of macro unwrapping: a definition inside a top-level macro
call (
@inline f(x) = …,Base.@kwdef struct …) is extracted as if unwrapped.
Deliberately out of scope (recorded here so absence reads as a decision,
not an accident): macro definitions get no nodes; anonymous functions
(x -> …) and do-blocks get no nodes (calls inside them belong to the
enclosing function, mirroring the Rust-closure/Go-func-literal rule);
nested/local named functions get no nodes and their bodies’ calls are
excluded from the parent; non-const global assignments, primitive type,
selective-import symbols (using Foo: bar records only Foo), import
aliases (import JSON as J records JSON), and inner constructors are
not extracted; &&/|| do not count toward branch metrics.
Structs§
Constants§
- JULIA_
NOISE_ NAMES - Base builtins that would otherwise dominate CALLS noise. Deliberately
omits
show,print,stringandparse: extendingBase.show/Base.printis the standard user pattern, and suppressing the bare name would orphan calls to those user-defined methods.