MCPcopy Index your code
hub / github.com/denoland/deno_ast

github.com/denoland/deno_ast @1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.1 ↗ · + Follow
425 symbols 1,014 edges 21 files 62 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

deno_ast

Discord Chat

Source text parsing, lexing, and AST related functionality for Deno.

use deno_ast::parse_module;
use deno_ast::MediaType;
use deno_ast::ParseParams;
use deno_ast::SourceTextInfo;

let source_text = "class MyClass {}";
let text_info = SourceTextInfo::new(source_text.into());
let parsed_source = parse_module(ParseParams {
  specifier: "file:///my_file.ts".to_string(),
  media_type: MediaType::TypeScript,
  text_info,
  capture_tokens: true,
  maybe_syntax: None,
  scope_analysis: false,
}).expect("should parse");

// returns the comments
parsed_source.comments();
// returns the tokens if captured
parsed_source.tokens();
// returns the module (AST)
parsed_source.module();
// returns the `SourceTextInfo`
parsed_source.text_info();

Core symbols most depended-on inside this repo

parse_module
called by 29
src/parsing.rs
parse_cjs
called by 19
src/cjs_parse.rs
parse
called by 18
src/transpiling/transforms.rs
assert_exports
called by 16
src/cjs_parse.rs
transpile
called by 16
src/transpiling/mod.rs
get
called by 13
src/dep.rs
visit_with_path
called by 12
src/scopes.rs
getCrate
called by 11
scripts/repos.ts

Shape

Function 226
Method 158
Class 30
Enum 11

Languages

Rust96%
TypeScript4%

Modules by API surface

src/transpiling/jsx_precompile.rs83 symbols
src/cjs_parse.rs67 symbols
src/scopes.rs45 symbols
src/transpiling/mod.rs41 symbols
src/parsing.rs32 symbols
src/dep.rs31 symbols
src/comments.rs28 symbols
src/transpiling/transforms.rs27 symbols
src/parsed_source.rs25 symbols
src/types.rs17 symbols
scripts/repos.ts15 symbols
src/text_changes.rs7 symbols

For agents

$ claude mcp add deno_ast \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact