Turn strs into chars where possible
This commit is contained in:
parent
73e32252c4
commit
5466f7afbf
6 changed files with 24 additions and 24 deletions
|
|
@ -9,11 +9,11 @@ use super::basic::{ident, space, Error};
|
|||
fn var_access(
|
||||
expr: impl Parser<char, Expr, Error = Error> + Clone,
|
||||
) -> impl Parser<char, Var, Error = Error> {
|
||||
just("[")
|
||||
just('[')
|
||||
.ignore_then(space())
|
||||
.then(expr)
|
||||
.then(space())
|
||||
.then_ignore(just("]"))
|
||||
.then_ignore(just(']'))
|
||||
.map_with_span(|((s0, index), s1), span| Var::Access {
|
||||
s0,
|
||||
index: Box::new(index),
|
||||
|
|
@ -28,13 +28,13 @@ fn var_assign(
|
|||
let local = text::keyword("local").ignore_then(space()).or_not();
|
||||
|
||||
local
|
||||
.then_ignore(just("["))
|
||||
.then_ignore(just('['))
|
||||
.then(space())
|
||||
.then(expr.clone())
|
||||
.then(space())
|
||||
.then_ignore(just("]"))
|
||||
.then_ignore(just(']'))
|
||||
.then(space())
|
||||
.then_ignore(just("="))
|
||||
.then_ignore(just('='))
|
||||
.then(space())
|
||||
.then(expr)
|
||||
.map_with_span(
|
||||
|
|
@ -59,7 +59,7 @@ fn var_assign_ident(
|
|||
local
|
||||
.then(ident())
|
||||
.then(space())
|
||||
.then_ignore(just("="))
|
||||
.then_ignore(just('='))
|
||||
.then(space())
|
||||
.then(expr)
|
||||
.map_with_span(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue