Skip to content

Commit

Permalink
feat: remove use of bitflags, flatten var modifiers
Browse files Browse the repository at this point in the history
This removes a dependency, and makes the code cleaner. There is no
longer a possibility of having a xor range or base64 alphabet without
the corresponding flag, and the code is globally simpler.
  • Loading branch information
vthib committed Apr 7, 2023
1 parent ec2e0aa commit 05877aa
Show file tree
Hide file tree
Showing 7 changed files with 299 additions and 234 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions boreal-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@ rust-version = "1.62"
# Parsing library
nom = "7.1"

# packing multiple flags together
bitflags = "1.3"

# Proper error reporting on parsing
codespan-reporting = "0.11"
3 changes: 2 additions & 1 deletion boreal-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ pub mod regex;
pub use regex::Regex;
mod rule;
pub use rule::{
Metadata, Rule, VariableDeclaration, VariableDeclarationValue, VariableFlags, VariableModifiers,
Metadata, Rule, VariableDeclaration, VariableDeclarationValue, VariableModifierBase64,
VariableModifiers,
};
mod string;
mod types;
Expand Down
Loading

0 comments on commit 05877aa

Please sign in to comment.