Expand description
§🛠️ Developer Guide
This directory contains the core logic implementation of the project. Below are instructions for a quick start.
§🚦 Quick Start
§Core API Usage
// Example: Basic calling workflow
fn main() {
// 1. Initialization
// 2. Execute core logic
// 3. Handle returned results
}§🔍 Module Description
- lib.rs: Exports public interfaces and core traits.
- parser/ (if exists): Implements specific syntax parsing logic.
- ast/ (if exists): Defines the syntax tree structure.
§🏗️ Architecture Design
The project follows the general architectural specifications of the Oak ecosystem, emphasizing:
- Immutability: Uses the Green/Red Tree structure to ensure efficient sharing of syntax trees.
- Fault Tolerance: Core logic is highly inclusive of erroneous input.
- Scalability: Convenient for downstream tools to perform secondary development. Visualization tools for the Oak language framework.
This crate provides tools for generating visual representations of syntax trees and other language structures, primarily in SVG format.
Re-exports§
pub use crate::geometry::Point;pub use crate::geometry::Rect;pub use crate::geometry::Size;pub use crate::geometry::Transform;pub use crate::graph::Graph;pub use crate::graph::GraphEdge;pub use crate::graph::GraphLayout;pub use crate::graph::GraphLayoutAlgorithm;pub use crate::graph::GraphLayoutConfig;pub use crate::graph::GraphNode;pub use crate::layout::EdgeType;pub use crate::layout::Layout;pub use crate::layout::LayoutConfig;pub use crate::layout::LayoutEdge;pub use crate::layout::LayoutEngine;pub use crate::layout::LayoutNode;pub use crate::layout::NodeType;pub use crate::render::ElementStyle;pub use crate::render::ExportFormat;pub use crate::render::LayoutExporter;pub use crate::render::RenderConfig;pub use crate::render::SvgRenderer;pub use crate::theme::ArrowConfig;pub use crate::theme::EdgeTheme;pub use crate::theme::HighlightTheme;pub use crate::theme::NodeTheme;pub use crate::theme::ShadowConfig;pub use crate::theme::TextTheme;pub use crate::theme::VisualizationTheme;pub use crate::tree::TreeLayout;pub use crate::tree::TreeLayoutAlgorithm;pub use crate::tree::TreeLayoutConfig;pub use crate::tree::TreeNode;
Modules§
- geometry
- Basic geometry types for visualization
- graph
- Graph layout algorithms for dependency and relationship visualization
- layout
- Layout algorithms for visualizing code structures
- render
- Rendering module for converting layouts to visual formats
- theme
- tree
- Tree layout algorithms for AST visualization
Enums§
- Error
- Error type for oak-visualize operations
Traits§
- Visualize
- Trait for types that can be visualized
Functions§
- to_svg
- Helper function to visualize a tree node as an SVG string
Type Aliases§
- Result
- Result type alias for oak-visualize operations