Compare commits
No commits in common. "dd2a73e1fd6b32e2eced59ab698fa179889ad75f" and "6ab52a5f66376cd0e5f55e67b633035f1d5b6b0a" have entirely different histories.
dd2a73e1fd
...
6ab52a5f66
|
@ -81,11 +81,11 @@
|
|||
"locked": {
|
||||
"lastModified": 1,
|
||||
"narHash": "sha256-8wkkYGr1dPSnX9oVMX8D6dTOROXKOYpBTKfriA0sEBI=",
|
||||
"path": "/nix/store/3447wnbwfkgd91v8x0d3hj48hvb2h010-source/flake.systems.nix",
|
||||
"path": "/nix/store/hprrr24yh5w0pbbbz2hlwblriaqb99kx-source/flake.systems.nix",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "/nix/store/3447wnbwfkgd91v8x0d3hj48hvb2h010-source/flake.systems.nix",
|
||||
"path": "/nix/store/hprrr24yh5w0pbbbz2hlwblriaqb99kx-source/flake.systems.nix",
|
||||
"type": "path"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -13,13 +13,12 @@
|
|||
# Dev tools
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
inputs.systems.url = "./flake.systems.nix";
|
||||
inputs.systems.flake = false;
|
||||
|
||||
outputs = inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
systems = import inputs.systems;
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
|
|
4
flake.systems.nix
Normal file
4
flake.systems.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
]
|
14
src/lib.rs
14
src/lib.rs
|
@ -59,20 +59,6 @@ pub struct Lexer {
|
|||
pub current_char: Option<char>,
|
||||
}
|
||||
|
||||
/// Instantiates Lexer and retrieves Tokens of given source.
|
||||
/// Returns Arc<[Token]>
|
||||
/// Equivalent to:
|
||||
/// ```
|
||||
/// let source = "some source";
|
||||
/// let lexed = Lexer::new(source).get_tokens();
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! lex {
|
||||
($source:expr) => {{
|
||||
$crate::Lexer::get_tokens(&mut $crate::Lexer::new($source))
|
||||
}};
|
||||
}
|
||||
|
||||
impl Lexer {
|
||||
/// Instantiates the [`Lexer`]
|
||||
pub fn new(input: &str) -> Self {
|
||||
|
|
Loading…
Reference in a new issue