public ISynchronizationPoint<Exception> closeElement(ElementContext ctx) {
		ISynchronizationPoint<Exception> next = next();
		do {
			if (!next.isUnblocked()) break;
			if (next.hasError()) return next;
			if (Type.END_ELEMENT.equals(event.type)) {
				if (event.context.getFirst() == ctx)
					return next;
			}
			next = next();
		} while (true);
		SynchronizationPoint<Exception> result = new SynchronizationPoint<>();
		ISynchronizationPoint<Exception> n = next;
		next.listenInline(() -> {
			if (!check(n, result)) return;
			if (Type.END_ELEMENT.equals(event.type)) {
				if (event.context.getFirst() == ctx) {
					result.unblock();
					return;
				}
			}
			new ParsingTask(() -> { closeElement(ctx).listenInline(result); }).start();
		}, result);
		return result;
	}
public ISynchronizationPoint < Exception > closeElement ( ElementContext ctx ) { ISynchronizationPoint < Exception > next = next ( ) ; do { if ( ! next . isUnblocked ( ) ) break ; if ( next . hasError ( ) ) return next ; if ( Type . END_ELEMENT . equals ( event . type ) ) { if ( event . context . getFirst ( ) == ctx ) return next ; } next = next ( ) ; } while ( true ) ; SynchronizationPoint < Exception > result = new SynchronizationPoint < > ( ) ; ISynchronizationPoint < Exception > n = next ; next . listenInline ( ( ) -> { if ( ! check ( n , result ) ) return ; if ( Type . END_ELEMENT . equals ( event . type ) ) { if ( event . context . getFirst ( ) == ctx ) { result . unblock ( ) ; return ; } } new ParsingTask ( ( ) -> { closeElement ( ctx ) . listenInline ( result ) ; } ) . start ( ) ; } , result ) ; return result ; }
Move forward until the closing tag of the given element is found.