Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Specy committed Sep 28, 2024
1 parent 63e07fb commit b35e79b
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion benches/parsing_json.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use {
criterion::{
criterion_group,
BatchSize,
Criterion,
Throughput,
criterion_group,
},
dotlr::{
Grammar,
Expand Down
2 changes: 1 addition & 1 deletion bindings/typescript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,4 @@ export class LALR1Parser<
return Err(e as ParserError)
}
}
}
}
2 changes: 1 addition & 1 deletion bindings/typescript/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ export type ActionTable<T extends Token = Token> = Map<T, Action[]>[]
export type ParsingTables<NT extends string = string, T extends Token = Token> = {
action_table: ActionTable<T>
goto_table: GoToTable<NT>
}
}
2 changes: 1 addition & 1 deletion bindings/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"outDir": "dist",
"rootDir": "./src",
}
}
}
2 changes: 1 addition & 1 deletion examples/calculator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use {
Tree,
},
rustyline::{
error::ReadlineError,
DefaultEditor,
error::ReadlineError,
},
std::process::ExitCode,
};
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,25 @@ mod prelude {
Logos,
},
prettytable::{
Row,
Table,
cell,
format::{
FormatBuilder,
LinePosition,
LineSeparator,
},
row,
Row,
Table,
},
ptree::TreeBuilder,
regex::Regex,
smallvec::{
smallvec,
SmallVec,
smallvec,
},
smol_str::{
format_smolstr,
SmolStr,
format_smolstr,
},
std::{
self,
Expand All @@ -105,7 +105,7 @@ mod prelude {
};
#[cfg(feature = "serde")]
pub use {
serde_renamed::ser::SerializeMap,
serde_renamed::Serializer,
serde_renamed::ser::SerializeMap,
};
}
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use {
ParserError,
},
rustyline::{
error::ReadlineError,
DefaultEditor,
error::ReadlineError,
},
std::{
path::PathBuf,
Expand Down
14 changes: 6 additions & 8 deletions tests/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@ Term -> %f
.trim(),
);

assert_eq!(
grammar.symbols().iter().map(|symbol| symbol.as_str()).collect::<Vec<_>>(),
["Expr", "Factor", "Exponent", "Term"],
);
assert_eq!(grammar.symbols().iter().map(|symbol| symbol.as_str()).collect::<Vec<_>>(), [
"Expr", "Factor", "Exponent", "Term"
],);

assert_eq!(grammar.start_symbol().as_str(), "Expr");

assert_eq!(
grammar.constant_tokens().iter().map(|token| token.as_str()).collect::<Vec<_>>(),
["+", "-", "*", "/", "^", "(", ")"],
);
assert_eq!(grammar.constant_tokens().iter().map(|token| token.as_str()).collect::<Vec<_>>(), [
"+", "-", "*", "/", "^", "(", ")"
],);

assert_eq!(
grammar.regular_expressions().keys().map(|token| token.as_str()).collect::<Vec<_>>(),
Expand Down

0 comments on commit b35e79b

Please sign in to comment.