Skip to main content

Crate sigil_parser

Crate sigil_parser 

Source
Expand description

Sigil Parser Library

A polysynthetic programming language with evidentiality types.

This crate provides:

  • Lexer and parser for Sigil source code
  • Tree-walking interpreter for development/debugging
  • JIT compiler using Cranelift for native performance
  • Comprehensive optimization passes (O0-O3)
  • Rich diagnostic reporting with colored output
  • AI-facing IR for tooling and agent integration

Re-exports§

pub use diagnostic::Diagnostic;
pub use diagnostic::DiagnosticBuilder;
pub use diagnostic::Diagnostics;
pub use diagnostic::FixSuggestion;
pub use diagnostic::Severity;
pub use interpreter::Evidence;
pub use interpreter::Function;
pub use interpreter::Interpreter;
pub use interpreter::RuntimeError;
pub use interpreter::Value;
pub use ir::IrDumpOptions;
pub use ir::IrEvidence;
pub use ir::IrFunction;
pub use ir::IrModule;
pub use ir::IrOperation;
pub use ir::IrType;
pub use lexer::Lexer;
pub use lexer::Token;
pub use lint::lint_file;
pub use lint::lint_source;
pub use lint::lint_source_with_config;
pub use lint::lint_directory;
pub use lint::lint_directory_parallel;
pub use lint::lint_and_fix;
pub use lint::apply_fixes;
pub use lint::watch_directory;
pub use lint::LintConfig;
pub use lint::LintConfigFile;
pub use lint::LintSettings;
pub use lint::LintId;
pub use lint::LintLevel;
pub use lint::LintCategory;
pub use lint::Linter;
pub use lint::DirectoryLintResult;
pub use lint::FixResult;
pub use lint::WatchConfig;
pub use lint::WatchResult;
pub use lint::Suppression;
pub use lint::parse_suppressions;
pub use lint::LintStats;
pub use lint::SarifReport;
pub use lint::generate_sarif;
pub use lint::generate_sarif_for_directory;
pub use lint::explain_lint;
pub use lint::list_lints;
pub use lint::Baseline;
pub use lint::BaselineEntry;
pub use lint::BaselineSummary;
pub use lint::BaselineLintResult;
pub use lint::find_baseline;
pub use lint::lint_with_baseline;
pub use lint::CliOverrides;
pub use lint::config_with_overrides;
pub use lint::lint_source_with_overrides;
pub use lint::LintCache;
pub use lint::CacheEntry;
pub use lint::CachedDiagnostic;
pub use lint::CacheStats;
pub use lint::IncrementalLintResult;
pub use lint::find_cache;
pub use lint::lint_directory_incremental;
pub use lint::CACHE_FILE;
pub use lint::LspSeverity;
pub use lint::LspDiagnostic;
pub use lint::LspRelatedInfo;
pub use lint::LspCodeAction;
pub use lint::LspTextEdit;
pub use lint::LspLintResult;
pub use lint::LspServerState;
pub use lint::lint_for_lsp;
pub use lint::GitIntegration;
pub use lint::lint_changed_files;
pub use lint::lint_changed_since;
pub use lint::lint_files;
pub use lint::generate_pre_commit_hook;
pub use lint::PRE_COMMIT_HOOK;
pub use lint::CustomRule;
pub use lint::CustomPattern;
pub use lint::CustomRulesFile;
pub use lint::CustomRuleMatch;
pub use lint::CustomRuleChecker;
pub use lint::lint_with_custom_rules;
pub use lint::IgnorePatterns;
pub use lint::filter_ignored;
pub use lint::collect_sigil_files_filtered;
pub use lint::lint_directory_filtered;
pub use lint::LintReport;
pub use lint::TrendData;
pub use lint::TrendDirection;
pub use lint::TrendSummary;
pub use lint::generate_html_report;
pub use lint::save_html_report;
pub use lint::CiFormat;
pub use lint::generate_ci_annotations;
pub use lower::lower_source_file;
pub use optimize::optimize;
pub use optimize::OptLevel;
pub use optimize::OptStats;
pub use optimize::Optimizer;
pub use parser::Parser;
pub use span::Span;
pub use stdlib::register_stdlib;
pub use typeck::EvidenceLevel;
pub use typeck::Type;
pub use typeck::TypeChecker;
pub use typeck::TypeError;
pub use codegen::JitCompiler;
pub use llvm_codegen::llvm::CompileMode;
pub use llvm_codegen::llvm::LlvmCompiler;
pub use ast::*;

Modules§

ast
Abstract Syntax Tree for Sigil.
codegen
Sigil JIT Compiler using Cranelift
diagnostic
Rich diagnostic reporting for Sigil.
ffi
Foreign Function Interface support for Sigil.
fmt
Code Formatter for Sigil Language
holographic
Holographic Data Structure Utilities
interpreter
Tree-walking interpreter for Sigil.
ir
AI-Facing Intermediate Representation (IR)
lexer
Lexer for the Sigil programming language.
lint
Linter for Sigil source code.
llvm_codegen
Sigil LLVM Compiler Backend
lower
AST to IR Lowering Pass
optimize
Sigil Optimization Passes
parser
Recursive descent parser for Sigil.
plurality
Plurality Extensions for Sigil
protocol
Sigil Protocol Support
span
Source span tracking for error reporting.
stdlib
Sigil Standard Library
tome
Tome - The Sigil Package Manager
tree_sitter_support
Tree-sitter integration for Sigil
typeck
Type checker for Sigil.
websocket
Native WebSocket client implementation for Sigil.

Macros§

sigil_debug
Print debug message only when verbose mode is enabled.
sigil_warn
Print warning message only when verbose mode is enabled.

Functions§

is_verbose
Check if verbose mode is enabled.
set_verbose
Enable or disable verbose debug output.