Skip to main content

Crate pascal

Crate pascal 

Source
Expand description

Pascal Compiler - A production-ready optimizing Pascal compiler

Re-exports§

pub use ast::Block;
pub use ast::Expr;
pub use ast::Expression;
pub use ast::ForDirection;
pub use ast::FunctionDecl;
pub use ast::Literal;
pub use ast::Module;
pub use ast::ModuleError;
pub use ast::ModuleResult;
pub use ast::Parameter;
pub use ast::ProcedureDecl;
pub use ast::Program;
pub use ast::SimpleType;
pub use ast::Statement;
pub use ast::Stmt;
pub use ast::Type;
pub use ast::Unit;
pub use error::CompileOptions;
pub use error::CompileResult;
pub use error::CompilerError;
pub use error::ParseError;
pub use error_suggestions::did_you_mean;
pub use error_suggestions::suggest_identifier;
pub use error_suggestions::suggest_similar;
pub use source_map::SourceMap;
pub use source_map::SourceMapping;
pub use interpreter::Interpreter;
pub use lexer::Lexer;
pub use loader::ModuleLoader;
pub use parallel::ParallelCompiler;
pub use parallel::ParallelConfig;
pub use parallel::ProgressTracker;
pub use compilation_events::CompilationEvent;
pub use compilation_events::EventEmitter;
pub use compilation_events::EventHandler;
pub use formatter::format_file;
pub use formatter::format_string;
pub use formatter::format_unit_file;
pub use formatter::needs_formatting;
pub use constant_eval::eval_constant;
pub use constant_eval::is_constant;
pub use docgen::generate_docs_from_source;
pub use docgen::DocFormat;
pub use conditional_compile::defines_from_args;
pub use conditional_compile::preprocess;
pub use advanced_types::infer_block_variable_types;
pub use plugin::CompilerPlugin;
pub use plugin::CompilationPhase;
pub use plugin::PluginRegistry;
pub use plugin::PluginResult;
pub use resolver::ModuleResolver;
pub use resolver::SymbolInfo;
pub use resolver::SymbolKind;
pub use resolver::SymbolTable;
pub use tokens::Token;
pub use unit_codegen::UnitCodeGenerator;

Modules§

advanced_types
Advanced type system features
ast
Unified AST definitions for Pascal - combining basic and enhanced features
attributes
Compiler attribute metadata and directive parsing.
bench
Simple performance benchmarking for Pascal programs.
build_system
Build system and package manager for Pascal projects.
compilation_events
Event-driven compilation phases
conditional_compile
Conditional compilation preprocessor
constant_eval
Compile-time constant evaluation
debugger
Interactive debugger with breakpoints and watch expressions
deps
Package dependency resolution: path, git, registry, and dependency graphs.
docgen
Documentation generator for Pascal sources
enhanced_error
Enhanced error handling for Pascal compiler
error
Simple error types for the Pascal compiler
error_conversions
Error conversion utilities for Pascal compiler
error_suggestions
Error message suggestions using Levenshtein distance (“did you mean X?”)
ffi
Foreign function interface for calling external (C/Rust) symbols.
formatter
Public API for the Pascal code formatter
ide
IDE support: completion symbols, hover info, and diagnostics helpers.
incremental
Incremental compilation cache — skip unchanged units on rebuild.
interfaces
Interface type registry — tracks interface declarations and class conformance.
interpreter
Tree-walking interpreter for Pascal programs
leak_check
Memory leak detection for the Pascal interpreter.
lexer
loader
Module loader for loading and caching Pascal units
memory_pool
Simple memory pool for frequently allocated strings in the interpreter.
optimized_symbol_table
Optimized symbol table for Pascal compiler
optimizer
Code optimization
parallel
Parallel compilation support using rayon
parser
Robust recursive descent Pascal parser Supports full Pascal language with error recovery
plugin
Plugin architecture for extending compiler functionality
ppu
PPU (Precompiled Pascal Unit) file format support
reflection
Runtime reflection — type introspection for interpreter values.
register_allocator
Register allocation using graph coloring
repl
Interactive REPL for Pascal with basic tab-completion hints.
resolver
Symbol resolution across modules
simd
SIMD instruction support
source_map
Source maps for debugging generated code
symbol_table
Symbol table for code generation (facade over OptimizedSymbolTable).
tokens
traits
Compiler trait definitions
type_checker
Type checking for code generation
unicode
UTF-8 string handling and normalization for Pascal sources.
unit_codegen
Unit-aware code generation
utils
Utility modules for common patterns (DRY principle)
wasm
WebAssembly code generation stub (WAT output).