Public functions indexed
This is a navigational API index, not source documentation. It summarizes the main public callable surface of the six reusable library crates in the workspace; command-line and language-server binaries are documented in their dedicated references.
The workspace baseline is v0.41.0. For the complete signatures and fields,
run cargo doc --workspace --no-deps; this hand-maintained index is not an
exhaustive replacement for rustdoc. The parser’s strict and tolerant entry
points share one grammar; tolerant errors do not imply formatter acceptance.
Any thread calling parsing, analysis, or formatting on deeply nested input
must provide at least vlog_parser::PARSE_STACK_SIZE (16 MiB) of stack.
The CLI and server configure their worker threads accordingly.
Function
Purpose
parse_source
Tokenize and strictly parse a complete source file
parse_source_tolerant
Parse while returning recoverable diagnostics
lexer::tokenize
Convert source text into trivia-bearing tokens
parser::parse
Strictly parse a prepared token stream
parser::parse_tolerant
Tolerantly parse a prepared token stream
Parser::parse_expr
Parse one expression from parser state
defines::collect_defines
Build a define table from tokens
DefineTable::from_entries
Rebuild a define table from persisted entries
DefineTable::entries
Return defines in source order
DefineTable::all
Return every definition for a macro name
DefineTable::latest
Return the last active definition for a name
Type
Public surface
LineIndex
new, line_count, line_col, utf16_position, offset, line_range
TextRange
new, empty, len, is_empty, contains, as_range
Token
is_kw, is_sym, is_macro, has_macro_args, is_base_only_number
TokenKind
is_keyword
Type
Public methods
ImportPath
text
Module
end_kw
ClassDecl
is_interface_class
BindDirective
target_path, head
DataType
is_implicit, params, inline
VirtualKw
text
CallComments
is_empty
WithComments
is_empty
Function
Purpose
format_source
Format a complete source string
format_range
Format only items selected by line ranges
verify_equivalence
Re-lex and compare normalized tokens, including comments
verify_convergence
Confirm a second formatting pass is identical
Function
Purpose
doc::text
Create a text document node
doc::group
Create a width-sensitive group
doc::indent
Nest document nodes by one indentation level
doc::concat
Concatenate document nodes
doc::join
Interleave document nodes with a separator
Printer::print
Render a document tree to text
Module/type
Public functions and methods
align
plan, render, flat_width
fence
fence_of, collect, region_at, protected_regions, is_protected
LineRanges
new, parse, spans
range
select, plan
Function
Purpose
run
Parse and lint source in one call
lint
Run enabled rules against a prepared context
all_rules
Return the complete rule registry
default_rules
Return rules enabled for a single-file run
workspace_rules
Return defaults plus project-aware semantic rules
rule_by_name
Resolve a registered rule by stable name
select_rules
Apply select/ignore rule names or severity classes to the registry
rules_named
Expand a rule name or severity class to registered rules
module_interfaces
Build the module interface facts used by lint oracles
rules_markdown
Generate canonical Markdown rule documentation
Type
Public surface
ParsedSource
parse, lex_error, tokens, file, context
LintContext
new, from_parse, with_tab_width, with_line_length, with_options, with_semantics, with_oracle, mentioned_elsewhere, has_oracle, module_interface, parsed_cleanly, line_length, options, option_bool, option_int, option_str, option_list, option_is_set, semantics, source, tokens, file, line_index, path, tab_width, line_text, touches_string, comments
MentionOracle
Supply mentioned_outside and optional module_interface for project-aware checks
Violation
new, with_fix
Fix
safe, unsafe_fix
Applicability
as_str
module function
apply_fixes (caller must filter format-fenced edits)
Severity
as_str, from_name, describes; classes Error, Warning, Style
RuleOptions
new, is_empty, set_raw, set, overlay, is_set, bool, int, str, list
OptionKind / OptionDefault
as_str, vocabulary / value, as_written
editor settings functions
vscode_lint_settings, rule_setting, severity_setting
Function or type
Public methods
analyze
Build a semantic model for one parsed file
Semantics
scopes, symbols, symbols_named, duplicates, references, file_scope, scope, symbol, symbol_at, reference_at, reference_id_at, reference, definition_of, references_of, document_symbols, resolution_counts, member_site, unit_site, instantiable_scope, member_scopes, file_span
Reference
resolved, is_external_candidate, is_inherited_candidate
Import
path, supplies
Scope
lookup_local, extends
Function or type
Public methods
WorkspaceIndex
build, files, path, file_id, units, member, members_of, members_of_chain, member_unit, instantiations_of, subclasses_of, base_of, instantiations, subclasses, facts_for, defines, find_define, references_to, references_are_ambiguous, files_spelling, files_mentioning, files_naming_in_macros, mentioned_outside, workspace_symbols, units_of, instantiable_units, counts, update_file, update_facts, absorb, remove_file, fingerprint
IndexBuilder
new, add_file, add_facts, finish
FileFacts
of, from_analysis, words, macro_words, path, encode, decode
DefinitionKey
of
resolve_external
Resolve unresolved file references against a workspace index
ExternalTarget
defs, best
ExternalResolutions
get, iter, counts, definition_of
index_order
Sort workspace inputs into their deterministic index order
words::harvest / harvest_text / harvest_raw
Build the shared identifier census from tokens or source text
FACTS_FORMAT is 17 . Cached facts include normal and macro identifier
censuses; Def::lines.positions can carry DeclPositions with UTF-16 ranges
for file-scope declarations. Any persisted shape or fact-census change needs
a codec-version decision so stale caches cannot silently omit answers.
Function
Purpose
prepare_rename
Validate a cursor target and return its editable identity
prepare_rename_here
Validate a target from one parsed file before workspace fan-out
rename_name_at
Return the spelling used to bound workspace rename inputs
rename
Plan local or workspace-aware rename edits
find_references
Collect local and cross-file reference locations
Function or type
Public methods
add_port
Add a port to a module interface
remove_port
Remove a port from a module interface
propagate_ports
Carry interface changes through instantiations
port_actions
Discover valid port refactors at a cursor
may_have_port_action
Cheaply preflight whether port actions are possible
port_action_modules
Return module names that bound a port action’s workspace inputs
enclosing_module
Return the module containing a cursor position
module_definition
Find a unique indexed module definition
module_names
Search indexed module names
sites_phrase
Share the port-action site-count wording with server offers
instantiation_plan
Build an instantiation plan from an indexed module
PortAction
label
InstantiationPlan
instance_name, has_escaped_identifier, render, render_with
WorkspaceEdit
file_count, edit_count, edits_for
Function or type
Public methods
config::parse
Parse strict lucisv configuration text
Discovery
new, for_input, for_file, for_dir
filelist::read
Resolve a nested EDA filelist
walk::collect_files
Walk inputs with ignores and exclusions
walk::is_excluded
Test a path against exclusion patterns
Function or type
Public methods
atomic::write_atomic
Replace file contents through a sibling temp file and rename; callers must coordinate concurrent writes to one target
content_hash
Compute the cache’s FNV-1a content fingerprint
Cache
load, disabled, is_clean, record, store
Types
The crates also expose their data models—AST nodes, diagnostics, rule traits, workspace identifiers, edits, plans, and formatter document nodes. This page intentionally indexes callable behavior; generated Rust API docs remain the right place for field-level type details.