Skip to content

Commit

Permalink
Fix bug: IN_LBDX_LAMBDA should end at rightmost colon
Browse files Browse the repository at this point in the history
  • Loading branch information
hsfzxjy committed Feb 20, 2021
1 parent b3a1bd3 commit a8c73a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lambdex/fmt/core/tkutils/rules/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def r(ctx: Context, token: TokenInfo):
ctx.pop_state()



@m(exact_type=tk.NL, last_state='ALL')
@m(exact_type=tk.NEWLINE, last_state='ALL')
@m(exact_type=tk.WHITESPACE, last_state='ALL')
Expand Down Expand Up @@ -108,6 +107,8 @@ def r(ctx: Context, token: TokenInfo):

@m(exact_type=tk.COLON, last_state=State.IN_LBDX_LAMBDA)
def r(ctx: Context, token: TokenInfo):
if ctx.last_op[1] != State.IN_LBDX_CALL:
return
ctx.pop_state()
ctx.push_state(State.EXPECT_LBDX_LSQB)

Expand Down

0 comments on commit a8c73a9

Please sign in to comment.