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§
- Name
Component - An individual component of a
ScopeName
. - Name
Resolver - A structure for resolving
ScopeName
s in minified code to their original names using information contained in aDecodedMap
. - Parse
Error - An error parsing the JS Source provided to
extract_scope_names
. - Scope
Index - An indexed structure of scopes that allows quick lookup by byte offset.
- Scope
Index Error - An Error that can happen when building a
ScopeIndex
. - Scope
Name - An abstract scope name which can consist of multiple
NameComponent
s. - Source
Context - A structure allowing fast line/column <-> byte offset remapping.
- Source
Context Error - An Error that can happen when building a
SourceContext
. - Source
Position - A line/column source position.
Enums§
- Scope
Lookup Result - The Result of a Scope lookup.
Functions§
- extract_
scope_ names - Extracts function scopes from the given JS-like
src
.
Type Aliases§
- Scopes
- The Scopes extracted from a piece of JS Code.