Minor cosmetic update to parser.rs
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
use crate::syn::{ast::*, error::*, lexer::*, token::*};
|
use crate::syn::{ast::*, error::*, lexer::*, token::*};
|
||||||
|
|
||||||
|
// /////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Parser
|
||||||
|
// /////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Parser<'t> {
|
pub struct Parser<'t> {
|
||||||
lexer: Lexer<'t>,
|
lexer: Lexer<'t>,
|
||||||
@@ -160,6 +164,10 @@ fn unescape_string(text: &str) -> String {
|
|||||||
string
|
string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Tests
|
||||||
|
// /////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
macro_rules! expect_atom {
|
macro_rules! expect_atom {
|
||||||
($parser:expr, $expected:expr) => {{
|
($parser:expr, $expected:expr) => {{
|
||||||
|
|||||||
Reference in New Issue
Block a user