precedence property

int get precedence
inherited

Get the precedence level for the top-most precedence rule.

@return The precedence level for the top-most precedence rule, or -1 if the parser context is not nested within a precedence rule.

Implementation

int get precedence {
  if (_precedenceStack.isEmpty) {
    return -1;
  }

  return _precedenceStack.last;
}