File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ proc parse_token(file, idx) {
63
63
}
64
64
" " -> return #none unit
65
65
"\n" -> return #none unit
66
+ "\r" -> return #none unit
67
+ "\x09" -> return #none unit
68
+ "\x00" -> return #none unit
66
69
}
67
70
return #err "unexpected '_'" |> str::fmt([c])
68
71
}
@@ -109,9 +112,7 @@ proc unexpected_end(expected) {
109
112
110
113
proc parse_string(tokens) {
111
114
case tokens |> iter::next() {
112
- #none -> return #err unexpected_end(
113
- "a string"
114
- )
115
+ #none -> return #err unexpected_end("a string")
115
116
#some p -> case p {
116
117
#ok t -> {
117
118
case t.type == "string" -> return #ok t.content
@@ -124,9 +125,7 @@ proc parse_string(tokens) {
124
125
125
126
proc parse_list(tokens, item_parser) {
126
127
case tokens |> iter::next() {
127
- #none -> return #err unexpected_end(
128
- "an opening square bracket ('[')"
129
- )
128
+ #none -> return #err unexpected_end("an opening square bracket ('[')")
130
129
#some p -> case p {
131
130
#ok t -> case t.type != "square_open" -> return #err unmet_expect(
132
131
"an opening square bracket ('[')", t.content
You can’t perform that action at this time.
0 commit comments