public void ExitOptionalWhere(QueryParser.OptionalWhereContext context) { if (context.WHERE() != null) { if (_expressions.Count <= 0) { // the predicate is invalid and we can't compile any part of it return; } var query = _queries.Pop(); var predicate = _expressions.Pop(); _queries.Push(query.Where(predicate)); } }
/// <summary> /// Exit a parse tree produced by <see cref="QueryParser.optionalWhere"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitOptionalWhere([NotNull] QueryParser.OptionalWhereContext context) { }
public void EnterOptionalWhere(QueryParser.OptionalWhereContext context) { }