Skip to content

Commit d46af57

Browse files
committed
[refactoring] Move function definition
1 parent 7cdb28d commit d46af57

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/parser/parser_common.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ use nom::{
1010

1111
use crate::parser::keywords::KEYWORDS;
1212

13+
/// Accepts any character except '"' and control characters (like \n, \t)
14+
pub fn is_string_char(c: char) -> bool {
15+
c != '"' && !c.is_control()
16+
}
17+
1318
pub fn separator<'a>(sep: &'static str) -> impl FnMut(&'a str) -> IResult<&'a str, &'a str> {
1419
delimited(multispace0, tag(sep), multispace0)
1520
}
@@ -56,8 +61,3 @@ fn identifier_continue(input: &str) -> IResult<&str, &str> {
5661
fn identifier_start_or_continue(input: &str) -> IResult<&str, &str> {
5762
recognize(alt((alpha1, tag("_"), nom::character::complete::digit1)))(input)
5863
}
59-
60-
/// Accepts any character except '"' and control characters (like \n, \t)
61-
pub fn is_string_char(c: char) -> bool {
62-
c != '"' && !c.is_control()
63-
}

0 commit comments

Comments
 (0)