File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,8 @@ fn primary() -> Parser(ast.Expression) {
192
192
193
193
fn atom ( ) -> Parser ( ast . Expression ) {
194
194
use name <- do ( atom_name ( ) )
195
- use payload <- do (
195
+ use payload <- do_in (
196
+ ctx . InAtom ,
196
197
chomp . one_of ( [
197
198
{
198
199
use _ <- do ( chomp . token ( token . LParen ) )
@@ -205,7 +206,7 @@ fn atom() -> Parser(ast.Expression) {
205
206
return ( [ payload ] )
206
207
} ,
207
208
] )
208
- |> chomp . or ( [ ] ) ,
209
+ |> chomp . or ( [ ] ) ,
209
210
)
210
211
return ( ast . Atom ( name , payload ) )
211
212
}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ pub type Ctx {
11
11
InLet ( String )
12
12
InList
13
13
InRecord
14
+ InAtom
14
15
InLambda
15
16
InBackpass
16
17
InCase
@@ -47,6 +48,7 @@ fn ctx_to_string(pair: #(lexer.Span, Ctx)) -> String {
47
48
InLet ( name ) -> "in let `" <> ansi . blue ( name ) <> "`"
48
49
InList -> "inside a list"
49
50
InRecord -> "inside a record"
51
+ InAtom -> "inside an atom"
50
52
InLambda -> "inside a lambda"
51
53
InBackpass -> "inside a backpass"
52
54
InCase -> "inside a case expression"
You can’t perform that action at this time.
0 commit comments