Skip to content
Snippets Groups Projects
Commit 43a8a87f authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

parser: resolve ambiguity where both prefix and primary actions are defined

If both actions are defined, a primary-expression action is accepted only if
the next token never starts new term. For example,

  parsed as primary expression:
  ":"   # next token 'end' has no action
  "(:)" # next token ')' has no action
  ":+y" # next token '+' is infix operator

  parsed as prefix operator:
  ":y"  # next token 'y' is primary expression
  ":-y" # next token '-' is prefix operator

This is mostly the same resolution as the infix/suffix rules.
parent e71e5629
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment