mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 04:22:41 +00:00
minor fixups
This commit is contained in:
parent
b425a59db5
commit
f4ddaeb11d
2 changed files with 3 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ let collect_chain (tts : token_type array) (collector : state -> ('a, parser_err
|
|||
in
|
||||
collect_chain_rec [] |> Result.map List.rev
|
||||
|
||||
let primary (state : state) : expr_result =
|
||||
let atom (state : state) : expr_result =
|
||||
let pos = cur_pos state in
|
||||
match peek_tt state with
|
||||
| Number x ->
|
||||
|
|
@ -115,7 +115,7 @@ let rec grouping (state : state) : expr_result =
|
|||
let tt = peek_tt state in
|
||||
let msg = Printf.sprintf "Expected RightParen, got %s instead" (show_token_type tt) in
|
||||
Error { pos; msg })
|
||||
else primary state
|
||||
else atom state
|
||||
|
||||
and call (state : state) : expr_result =
|
||||
let* expr = grouping state in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue