Use bitflags.

This commit is contained in:
Stephen Chung
2022-11-23 11:36:30 +08:00
parent d911327242
commit 4e27039521
33 changed files with 294 additions and 259 deletions

View File

@@ -1,5 +1,6 @@
#![allow(non_snake_case)]
use crate::module::ModuleFlags;
use crate::plugin::*;
use crate::{def_package, Position, RhaiResultOf, ERR, INT};
#[cfg(feature = "no_std")]
@@ -54,7 +55,7 @@ macro_rules! reg_functions {
def_package! {
/// Basic mathematical package.
pub BasicMathPackage(lib) {
lib.standard = true;
lib.flags |= ModuleFlags::STANDARD_LIB;
// Integer functions
combine_with_exported_module!(lib, "int", int_functions);