module documentation
Bindings for the official nwn script compiler.
The compiler depends on a native library. This package ships with precompiled binaries for MacOS, Windows and Linux both on X64 and ARM64 architectures.
This module or the underlying library is currently NOT threadsafe.
Example
>>> from nwn.nwscript.comp import Compiler ... ... def resolver(filename: str) -> bytes | None: ... # Load the file from disk, or return None if not found. ... # You can also service from memory, or anywhere else. ... with open(filename, "rb") as f: ... return f.read() ... comp = Compiler(resolver) >>> ncs, ndb = comp.compile("myscript.nss") >>> print(ncs) # The compiled bytecode >>> print(ndb) # The debug information
Class |
|
A class to compile NWScript using the NWScript compiler. |
Class |
|
Undocumented |
Exception |
|
Exception raised for errors in the compilation process. |
Class | _ |
Undocumented |
Constant | _CB |
Undocumented |
Constant | _CB |
Undocumented |