perl-symbol-types 0.11.0

Unified Perl symbol taxonomy for LSP tooling
Documentation
  • Coverage
  • 100%
    27 out of 27 items documented2 out of 12 items with examples
  • Size
  • Source code size: 19.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.17 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • EffortlessMetrics/perl-lsp
    0 1 46
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • EffortlessSteven

perl-symbol-types

Unified Perl symbol taxonomy for LSP tooling.

Part of the perl-lsp workspace.

Public API

  • VarKind -- Variable sigil classification: Scalar ($), Array (@), Hash (%).
  • SymbolKind -- Canonical symbol taxonomy: Package, Class, Role, Subroutine, Method, Variable(VarKind), Constant, Import, Export, Label, Format.

Key methods on SymbolKind: to_lsp_kind(), to_lsp_kind_document_symbol(), sigil(), is_variable(), is_callable(), is_namespace(), plus convenience constructors scalar(), array(), hash().

Usage

use perl_symbol_types::{SymbolKind, VarKind};

let var = SymbolKind::scalar();
assert_eq!(var.sigil(), Some("$"));
assert!(var.is_variable());
assert_eq!(SymbolKind::Subroutine.to_lsp_kind(), 12); // LSP Function

License

Licensed under MIT OR Apache-2.0 at your option.