mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Remove private tags from parser package
This commit is contained in:
parent
ee30b85430
commit
f630536f5c
@ -17,10 +17,7 @@ interface Parser
|
||||
exposes [ Parser ]
|
||||
imports []
|
||||
|
||||
Parser a :
|
||||
[
|
||||
@Parser (Bytes -> Result { answer : a, rest : Bytes } Problem)
|
||||
]
|
||||
Parser a := Bytes -> Result { answer : a, rest : Bytes } Problem
|
||||
|
||||
Problem :
|
||||
[
|
||||
|
@ -19,10 +19,7 @@ interface Parser
|
||||
exposes [ Parser ]
|
||||
imports []
|
||||
|
||||
Parser a :
|
||||
[
|
||||
@Parser (Str -> Result { answer : a, rest : Str } RawProblem),
|
||||
]
|
||||
Parser a := Str -> Result { answer : a, rest : Str } RawProblem
|
||||
|
||||
Problem :
|
||||
[
|
||||
@ -51,16 +48,16 @@ keep : Parser a, (a -> Parser b) -> Parser b
|
||||
skip : Parser *, ({} -> Parser b) -> Parser b
|
||||
|
||||
symbol : Str -> Parser {}
|
||||
symbol = \symbol -> @Parser Str.chompStr symbol
|
||||
symbol = \symbol -> $Parser Str.chompStr symbol
|
||||
|
||||
u8 : Parser U8
|
||||
u8 = @Parser Str.parseU8
|
||||
u8 = $Parser Str.parseU8
|
||||
|
||||
i8 : Parser I8
|
||||
i8 = @Parser Str.parseI8
|
||||
i8 = $Parser Str.parseI8
|
||||
|
||||
end : Parser {}
|
||||
end = @Parser \str ->
|
||||
end = $Parser \str ->
|
||||
if Str.isEmpty str then
|
||||
Ok {}
|
||||
else
|
||||
@ -68,7 +65,7 @@ end = @Parser \str ->
|
||||
|
||||
lazy : ({} -> Parser a) -> Parser a
|
||||
lazy = \thunk ->
|
||||
@Parser \str ->
|
||||
@Parser parse = thunk {}
|
||||
$Parser \str ->
|
||||
$Parser parse = thunk {}
|
||||
|
||||
parse str
|
||||
|
Loading…
Reference in New Issue
Block a user