1#![forbid(unsafe_code)]
25
26extern crate self as yomi_core;
27
28mod analysis;
29mod assign_ids;
30mod backend;
31mod codes;
32mod compile;
33mod decls;
34mod diag;
35mod explore;
36mod format;
37mod ident;
38mod ir;
39mod package;
40mod pool;
41mod program;
42mod registry;
43mod repl;
44mod schema_file;
45mod suggest;
46mod syntax;
47mod texts;
48mod type_expand;
49mod value;
50mod vm;
51
52pub use analysis::{Analysis, Reference, Span, Symbol, SymbolKind, analyze, is_name_char};
53pub use assign_ids::{
54 AUTO_ID_LEN, IdRng, Insertion, MissingId, apply as apply_insertions, plan as plan_ids,
55 plan_program as plan_ids_program,
56};
57pub use codes::{CodeGroup, CodeInfo, ErrorCodeInfo, all_codes, core_command_error_codes};
58pub use compile::{
59 CompileOptions, LocalType, compile, compile_modules, compile_modules_with_options,
60 compile_modules_with_warnings, compile_with_warnings, infer_local_types,
61};
62pub use decls::{DeclError, DeclErrorKind, MAX_DECLS_BYTES, MAX_JSON_DEPTH};
63pub use diag::{DiagArg, DiagCode, Diagnostic, Severity};
64pub use explore::{
65 DEFAULT_MAX_STATES, ErrorPath, ExploreConfig, ExploreReport, ExploreStep, StuckPath, TestPath,
66 explore,
67};
68pub use format::{FormatError, format_source};
69pub use package::{
70 CommandError, CommandErrorKind, Ctx, EffectFn, IntoReturn, MigrateError, Package, PackageReg,
71 QueryFn, decode_slice, encode_slice,
72};
73pub use program::{Program, StopKind};
74pub use registry::{
75 CommandDecl, CommandId, CommandKind, FromArgs, FromValue, IntoValue, Kind, PackageDecl,
76 PackageItem, Registry, RegistryError, StopDecl, Str, Sugar, VarDecl, VarHandle, YomiArgs,
77 YomiDecl, YomiMap, YomiType,
78};
79pub use repl::{
80 Applied, ApplyError, ApplyInvalid, Completeness, Declared, Def, InputKind, Name, Repl,
81 ReplYield, Submitted, completeness,
82};
83pub use schema_file::{ExtractError, extract_schema, frozen_schema, migrate_template};
84pub use syntax::keywords::{
85 CONTEXTUAL_KEYWORDS, ContextualKeyword, ContextualPosition, KEYWORDS, Keyword, KeywordKind,
86 is_reserved, keyword,
87};
88pub use texts::{TextError, TextErrorKind, TextIssue, TextIssueKind, TextTable};
89pub use value::{
90 EnumValue, FnValue, Identity, ListData, MAX_TYPE_DEPTH, MapData, MapEntries, StrValue,
91 StructValue, Ty, TypeDecl, TypeKind, Value, VariantDecl, find_type,
92};
93pub use vm::{
94 CueRef, DEFAULT_HISTORY_LIMIT, DEFAULT_SEED, DebugHook, DebugYield, Debugger, FrameInfo,
95 HookAction, Input, InterruptHandle, LineEvent, LoadError, LoadErrorKind, LoadPolicy,
96 LoadReport, PauseHandle, PendingStop, PersistentReport, ReloadError, ResolvedBy, Rng, Snapshot,
97 SnapshotLog, StepMode, StopRecord, UnitKind, Variable, Vm, VmConfig, VmError, VmErrorKind,
98 Yield, pending_stop,
99};
100pub use yomi_derive::YomiType;
101
102pub fn version() -> &'static str {
104 env!("CARGO_PKG_VERSION")
105}
106
107#[cfg(test)]
108mod tests;