mirror of
https://github.com/idris-lang/Idris2.git
synced 2025-01-07 00:07:19 +03:00
Don't use too many let 2
This commit is contained in:
parent
fdb0d97039
commit
88ad6c2f73
@ -84,12 +84,12 @@ tokenise pred tokenizer line col acc str
|
||||
getFirstToken : Tokenizer a -> List Char ->
|
||||
Either StopReason (WithBounds a, Int, Int, List Char)
|
||||
getFirstToken (Match lex fn) str
|
||||
= do let Just (tok, rest) = scan lex [] str
|
||||
| _ => Left NoRuleApply
|
||||
let line' = line + cast (countNLs tok)
|
||||
let col' = getCols tok col
|
||||
Right (MkBounded (fn (fastPack (reverse tok))) False line col line' col',
|
||||
line', col', rest)
|
||||
= let Just (tok, rest) = scan lex [] str
|
||||
| _ => Left NoRuleApply
|
||||
line' = line + cast (countNLs tok)
|
||||
col' = getCols tok col in
|
||||
Right (MkBounded (fn (fastPack (reverse tok))) False line col line' col',
|
||||
line', col', rest)
|
||||
getFirstToken (Compose begin tagger middleFn endFn fn) str
|
||||
= let Just (beginTok, rest) = scan begin [] str
|
||||
| _ => Left NoRuleApply
|
||||
|
Loading…
Reference in New Issue
Block a user