Expand description
Loading of signature files (.sig) for stdlib and API definitions.
Use load_signatures_from_dir or default_signature_roots to obtain
parsed signature roots for DocumentAnalysis and
[analyze_with_signatures].
Constants§
- DEFAULT_
SIGNATURES_ DIR - Default directory for .sig files when no explicit path is given.
Override with env var
LEEKSCRIPT_SIGNATURES_DIR.
Functions§
- build_
sig_ definition_ locations - Build a map from function/global name to (path, 0-based line) for one parsed .sig file.
- default_
signature_ roots - If no signature path was given, use default locations:
LEEKSCRIPT_SIGNATURES_DIRenv var if set, elseexamples/signatures, elseleekscript-rs/examples/signatures(when run from workspace root). Returns empty vec if no directory is found. - default_
signature_ roots_ with_ locations - Like
default_signature_rootsbut also returns a map from function/global name to (path, 0-based line) for hover/definition links into .sig files. - load_
signatures_ from_ dir - Load signature AST roots from a directory (all
*.sigfiles). - load_
signatures_ from_ dir_ with_ locations - Load signature roots and a map from function/global name to (path, 0-based line) for link resolution.