Crate erg_common

source ·
Expand description

provides utilities for parser, compiler, and vm crate.

Re-exports

pub use crate::str::Str;

Modules

defines a command-line parser for ergc.
provides common components for error handling.
Fast, non-cryptographic hash used by rustc and Firefox.
defines Opcode (represents Python bytecode opcodes).
defines Opcode (represents Python bytecode opcodes).
defines Opcode (represents Python bytecode opcodes).
defines Opcode (represents Python bytecode opcodes).
utilities for calling CPython.
オブジェクトのシリアライズ(バイナリ列化)のためのユーティリティーを定義・実装する
defines common traits used in the compiler.
Topological sort
Copied and modified from the crossterm. Making it a little more convenient and safe to query whether something is a terminal teletype or not. This module defines the IsTty trait and the is_tty method to return true if the item represents a terminal.

Macros

Once the argument is parsed into String, so use addr_eq! or AddrEq trait if you want to compare addresses
Supports up to double unwrap : is a dummy token to bypass restrictions
indicates the current invoked function.
impl<T: NestedDisplay> Display for T NestedDisplayはorphan-ruleに違反するので個別定義する
For Decl, Def, Call, etc., which can occupy a line by itself
Debug log utility. directives: c: colored output f: file specified f+c: file specified and colored (e.g. colored output to stderr) info: info logging, (comprehensive shorthand for “c GREEN”) info_f: file version of info err: error logging, (comprehensive shorthand for “c RED”) err_f: file version of err
More languages will be added … Macros do not expand parameters, eliminating the cost of format!

Functions

cut \n
If you want to get a hash consisting of multiple objects, pass it as a tuple or array
\r\n (Windows), \r (old MacOS) -> \n (Unix)
at least, this is necessary for Windows and macOS

Type Definitions