"windows-sys 0.59.0",
]
-[[package]]
-name = "flagset"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7ac824320a75a52197e8f2d787f6a38b6718bb6897a35142d749af3c0e8f4fe"
-
[[package]]
name = "flate2"
version = "1.1.1"
"enum-iterator",
"enum-map",
"enumset",
- "flagset",
"flate2",
"hashbrown 0.15.5",
"hexplay",
unicode-width = "0.2.0"
chardetng = "0.1.17"
enum-map = { version = "2.7.3", features = ["serde"] }
-flagset = "0.4.6"
pspp-derive = { version = "0.1.0", path = "../pspp-derive" }
either = "1.13.0"
enum-iterator = "2.1.0"
use data_list::data_list_command;
use descriptives::descriptives_command;
use either::Either;
-use flagset::{FlagSet, flags};
+use enumset::{EnumSet, EnumSetType};
use pspp_derive::FromTokens;
use crate::{
pub mod data_list;
pub mod descriptives;
-flags! {
- enum State: u8 {
- /// No active dataset yet defined.
- Initial,
+#[derive(Debug, EnumSetType)]
+enum State {
+ /// No active dataset yet defined.
+ Initial,
- /// Active dataset has been defined.
- Data,
+ /// Active dataset has been defined.
+ Data,
- /// Inside `INPUT PROGRAM`.
- InputProgram,
+ /// Inside `INPUT PROGRAM`.
+ InputProgram,
- /// Inside `FILE TYPE`.
- FileType,
+ /// Inside `FILE TYPE`.
+ FileType,
- /// State nested inside `LOOP` or `DO IF`, inside [State::Data].
- NestedData,
+ /// State nested inside `LOOP` or `DO IF`, inside [State::Data].
+ NestedData,
- /// State nested inside `LOOP` or `DO IF`, inside [State::InputProgram].
- NestedInputProgram,
- }
+ /// State nested inside `LOOP` or `DO IF`, inside [State::InputProgram].
+ NestedInputProgram,
}
struct Command {
- allowed_states: FlagSet<State>,
+ allowed_states: EnumSet<State>,
enhanced_only: bool,
testing_only: bool,
no_abbrev: bool,
ctables_command(),
data_list_command(),
Command {
- allowed_states: FlagSet::full(),
+ allowed_states: EnumSet::all(),
enhanced_only: false,
testing_only: false,
no_abbrev: false,
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
-use flagset::FlagSet;
+use enumset::EnumSet;
use super::{By, Comma, Command, Equals, Integer, Number, Punctuated, Subcommands, VarList};
use crate::command::{
pub(super) fn crosstabs_command() -> Command {
Command {
- allowed_states: FlagSet::full(),
+ allowed_states: EnumSet::all(),
enhanced_only: false,
testing_only: false,
no_abbrev: false,
use std::fmt::Debug;
use either::Either;
-use flagset::FlagSet;
+use enumset::EnumSet;
use super::{
And, Asterisk, By, Command, Dash, Equals, Exp, Gt, InSquares, Integer, Number, Plus,
pub(super) fn ctables_command() -> Command {
Command {
- allowed_states: FlagSet::full(),
+ allowed_states: EnumSet::all(),
enhanced_only: false,
testing_only: false,
no_abbrev: false,
// this program. If not, see <http://www.gnu.org/licenses/>.
use either::Either;
-use flagset::FlagSet;
+use enumset::EnumSet;
use super::{Comma, Command, Equals, Integer, Punctuated, Seq0, Seq1, Slash};
use crate::{
pub(super) fn data_list_command() -> Command {
Command {
- allowed_states: FlagSet::full(),
+ allowed_states: EnumSet::all(),
enhanced_only: false,
testing_only: false,
no_abbrev: false,
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
-use flagset::FlagSet;
+use enumset::EnumSet;
use super::{Comma, Command, Equals, Punctuated, Seq1, Subcommands};
use crate::command::{
pub(super) fn descriptives_command() -> Command {
Command {
- allowed_states: FlagSet::full(),
+ allowed_states: EnumSet::all(),
enhanced_only: false,
testing_only: false,
no_abbrev: false,