brane_dsl/scanner/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//  MOD.rs
//    by Lut99
//
//  Created:
//    25 Aug 2022, 11:01:39
//  Last edited:
//    17 Jan 2023, 14:55:05
//  Auto updated?
//    Yes
//
//  Description:
//!   Defines the module that implements the scanner part of the parser.
//

// Declare the modules
pub mod comments;
pub mod literal;
pub mod scanning;
pub mod tokens;

// Bring some stuff into this namespace
pub use scanning::scan_tokens;
pub use tokens::{Token, Tokens};


// Define some useful types for this module
/// Shortcut for a LocatedSpan that carries a &str and no additional data.
pub type Span<'a> = nom_locate::LocatedSpan<&'a str>;