Crate js_source_scopes
source · [−]Expand description
JS Source Scopes
This crate provides functionality for extracting and processing scope information from JavaScript source files, and resolving that scope via SourceMaps.
Features
- Extracting scopes from source text using
extract_scope_names
- Fast lookup of scopes by byte offset using
ScopeIndex
- Fast conversion between line/column source positions and byte offsets using
SourceContext
- Resolution of minified scope names to their original names using
NameResolver
License
JS Source Scopes is licensed under the Apache-2.0 license.
Structs
An individual component of a
ScopeName
.A structure for resolving
ScopeName
s in minified code to their original names
using information contained in a DecodedMap
.An indexed structure of scopes that allows quick lookup by byte offset.
An Error that can happen when building a
ScopeIndex
.An abstract scope name which can consist of multiple
NameComponent
s.A structure allowing fast line/column <-> byte offset remapping.
An Error that can happen when building a
SourceContext
.A line/column source position.
Enums
The Result of a Scope lookup.
Functions
Extracts function scopes from the given JS-like
src
.