I can't understand these grammar rules, and what the "returns" and "current" keywords means ?

WhereEntry returns WhereEntry:
AndWhereEntry ({OrWhereEntry.entries+=current} 
    ("OR" entries+=AndWhereEntry)+)?
;
有帮助吗?

解决方案

  1. returns means: the result of the rule will be of type WhereEntry.
  2. current means: the object parsed so far.

In sum this will mean

  • AndWhereEntry is a Subclass of WhereEntry.
  • if there is an OR then the AndWhereEntry parsed before will be added to the OrWhereEntry entries list.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top