1#![forbid(unsafe_code)]
2#, which provides the resource\n layer through which source and compiled script files are typically loaded\n- [`nwnrs_types::install`](https://docs.rs/nwnrs-types/latest/nwnrs_types/install/),\n which resolves the install root and language root needed to locate\n `nwscript.nss` for compilation\n\n## Why This Crate Exists\n\nThe point of `nwnrs-types` is to make the language subsystem inspectable and\noperable at every meaningful stage, from raw source bundle through lowered IR\nand into bytecode and debug artifacts.\n"include_str!("../README.md")]
3
4extern crate self as nwnrs_nwscript;
5
6mod ast;
7mod codegen;
8mod diag;
9mod driver;
10mod graphviz;
11mod hash;
12mod hir;
13mod int_literal;
14mod ir;
15mod langspec;
16mod lexer;
17mod ncs;
18mod ndb;
19mod nwasm;
20mod opt;
21mod parser;
22mod preprocess;
23mod sema;
24mod session;
25mod source;
26mod token;
27mod vm;
28
29pub use ast::*;
30pub use codegen::*;
31pub use diag::*;
32pub use driver::*;
33pub use graphviz::*;
34pub use hash::*;
35pub use hir::*;
36pub use ir::*;
37pub use langspec::*;
38pub use lexer::*;
39pub use ncs::*;
40pub use ndb::*;
41pub use nwasm::*;
42pub use parser::*;
43pub use preprocess::*;
44pub use sema::*;
45pub use session::*;
46pub use source::*;
47pub use token::*;
48pub use vm::*;
49
50pub mod prelude {
52 pub use crate::{
53 AssignmentOp, BatchCompileEntry, BatchCompileError, BatchCompileOptions,
54 BatchCompileReport, BatchCompileStatus, BinaryOp, BlockStmt, BuiltinConstant,
55 BuiltinFunction, BuiltinParameter, BuiltinType, BuiltinValue, CaseStmt, CodegenError,
56 CompileArtifacts, CompileError, CompileFileOutcome, CompileOptions, CompilerDriverError,
57 CompilerDriverOptions, CompilerErrorCode, CompilerHost, CompilerHostError, CompilerSession,
58 CompilerSessionError, CompilerSessionOptions, DEFAULT_LANGSPEC_SCRIPT_NAME, Declaration,
59 DefaultStmt, DirectoryCompilerHost, DoWhileStmt, Expr, ExprKind, ExpressionStmt,
60 FileSystemScriptResolver, ForStmt, FunctionDecl, HirBlock, HirCallTarget, HirDeclarator,
61 HirDeclareStmt, HirDoWhileStmt, HirExpr, HirExprKind, HirField, HirForStmt, HirFunction,
62 HirGlobal, HirIfStmt, HirLocal, HirLocalId, HirLocalKind, HirLowerError, HirModule,
63 HirParameter, HirReturnStmt, HirStmt, HirStruct, HirSwitchStmt, HirValueRef, IfStmt,
64 IncludeDirective, IrBlock, IrBlockId, IrFunction, IrGlobal, IrInstruction, IrLocalId,
65 IrLowerError, IrModule, IrTerminator, IrValueId, Keyword, LangSpec, LangSpecError, Lexer,
66 LexerError, MAX_TOKEN_LENGTH, MagicLiteral, NCS_BINARY_HEADER_SIZE, NCS_HEADER,
67 NCS_OPERATION_BASE_SIZE, NW_SCRIPT_SOURCE_RES_TYPE, NamedItem, NcsAsmError, NcsAsmLine,
68 NcsAuxCode, NcsDisassemblyOptions, NcsHeader, NcsHeaderError, NcsInstruction, NcsOpcode,
69 NcsReadError, Ndb, NdbError, NdbFile, NdbFunction, NdbLine, NdbStruct, NdbStructField,
70 NdbType, NdbVariable, OptimizationLevel, Parameter, ParseError, ParserError,
71 PreprocessError, PreprocessedSource, ResolvedParseError, ReturnStmt, Script,
72 ScriptResolver, SemanticError, SemanticField, SemanticFunction, SemanticGlobal,
73 SemanticModel, SemanticOptions, SemanticParameter, SemanticStruct, SemanticType,
74 SimpleStmt, SourceBundle, SourceError, SourceFile, SourceId, SourceLoadOptions,
75 SourceLocation, SourceMap, Span, Stmt, StructDecl, StructFieldDecl, SwitchStmt, Token,
76 TokenKind, TopLevelItem, TypeKind, TypeSpec, UnaryOp, VarDeclarator, Vm, VmCommandHandler,
77 VmEngineStructureComparer, VmEngineStructureFactory, VmEngineStructureValue, VmError,
78 VmFunctionInfo, VmObjectId, VmRunOptions, VmScript, VmSituation, VmSourceLocation,
79 VmStepOutcome, VmTraceEvent, VmTraceHook, VmValue, WhileStmt, analyze_script,
80 analyze_script_with_options, assemble_ncs_bytes, assemble_ncs_text, compile_file_with_host,
81 compile_hir_to_ncs, compile_paths, compile_script, compile_script_with_source_map,
82 compile_source_bundle, decode_ncs_header, decode_ncs_instructions, disassemble_ncs,
83 encode_ncs_instructions, lex_bytes, lex_source, lex_text, load_langspec,
84 load_source_bundle, lower_hir_to_ir, lower_to_hir, nwscript_string_hash,
85 nwscript_string_hash_bytes, parse_bytes, parse_langspec, parse_langspec_bytes,
86 parse_langspec_from_source_map, parse_ndb_str, parse_resolved_script, parse_source,
87 parse_source_bundle, parse_text, parse_tokens, preprocess_source_bundle, read_ndb,
88 render_disassembly_lines, render_ncs_disassembly, render_ncs_disassembly_with_ndb,
89 render_script_graphviz, write_ndb,
90 };
91}