Fix no_function feature.

This commit is contained in:
Stephen Chung 2022-02-26 17:41:27 +08:00
parent 9ef522b699
commit e767731953
3 changed files with 11 additions and 11 deletions

View File

@ -4,6 +4,15 @@ use bitflags::bitflags;
#[cfg(feature = "no_std")] #[cfg(feature = "no_std")]
use std::prelude::v1::*; use std::prelude::v1::*;
/// A type representing the access mode of a function.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum FnAccess {
/// Private function.
Private,
/// Public function.
Public,
}
bitflags! { bitflags! {
/// _(internals)_ A type that holds a configuration option with bit-flags. /// _(internals)_ A type that holds a configuration option with bit-flags.
/// Exported under the `internals` feature only. /// Exported under the `internals` feature only.

View File

@ -9,13 +9,13 @@ pub mod stmt;
pub use ast::{ASTNode, AST}; pub use ast::{ASTNode, AST};
pub use expr::{BinaryExpr, CustomExpr, Expr, FnCallExpr, FnCallHashes}; pub use expr::{BinaryExpr, CustomExpr, Expr, FnCallExpr, FnCallHashes};
pub use flags::ASTFlags; pub use flags::{ASTFlags, FnAccess};
pub use ident::Ident; pub use ident::Ident;
#[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_module"))]
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]
pub use script_fn::EncapsulatedEnviron; pub use script_fn::EncapsulatedEnviron;
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]
pub use script_fn::{FnAccess, ScriptFnDef, ScriptFnMetadata}; pub use script_fn::{ScriptFnDef, ScriptFnMetadata};
pub use stmt::{ pub use stmt::{
ConditionalStmtBlock, OpAssignment, Stmt, StmtBlock, StmtBlockContainer, SwitchCases, ConditionalStmtBlock, OpAssignment, Stmt, StmtBlock, StmtBlockContainer, SwitchCases,
TryCatchBlock, TryCatchBlock,

View File

@ -7,15 +7,6 @@ use crate::{Identifier, StaticVec};
use std::prelude::v1::*; use std::prelude::v1::*;
use std::{fmt, hash::Hash}; use std::{fmt, hash::Hash};
/// A type representing the access mode of a function.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum FnAccess {
/// Private function.
Private,
/// Public function.
Public,
}
/// _(internals)_ Encapsulated AST environment. /// _(internals)_ Encapsulated AST environment.
/// Exported under the `internals` feature only. /// Exported under the `internals` feature only.
/// ///