@@ -23,7 +23,7 @@ public class FexPreOp<T>
2323
2424 public FexPreOp ( Action < T > preOp ) => _preOp = preOp ;
2525
26- public void SetAction ( Action < T > preOp ) => _preOp = preOp ;
26+ public void SetAction ( Action < T > ? preOp ) => _preOp = preOp ;
2727
2828 public void Run ( T ctx ) {
2929 if ( ! _hasRun ) _preOp ? . Invoke ( ctx ) ;
@@ -115,7 +115,7 @@ public FexBuilder<T> Assert(Func<T, bool> assert, Action<T> failAction = null) {
115115 /// <summary>
116116 /// Perform an Action on the Context-T (does no affect the validity of a sequence).
117117 /// </summary>
118- public FexBuilder < T > Act ( Action < T > action ) => AddFex ( new FexAct < T > ( action ) ) ;
118+ public FexBuilder < T > Act ( Action < T > ? action ) => AddFex ( new FexAct < T > ( action ) ) ;
119119
120120 /// <summary>
121121 /// Perform a repeated Action on the Context-T (does no affect the validity of a sequence):<br/>
@@ -246,17 +246,34 @@ public FexBuilder<T> ActValue<V>(Action<V> valueAction) {
246246 return this ;
247247 }
248248
249+ /// <summary>
250+ /// Perform the previously defined (via FlowExpression.DefSkip(...)) skip operation:<br/>
251+ /// - Typically used to skip spaces etc.<br/>
252+ /// - Runs if defined and does no affect the validity of a sequence.
253+ /// </summary>
254+ /// <returns></returns>
255+ public FexBuilder < T > Skip ( ) => Act ( _buildState . SkipOp ) ;
256+
257+
249258 /// <summary>
250259 /// Binds a pre-operator to all subsequent operators:<br/>
251260 /// - A pre-operator executes before an operator as an action on the context:<br/>
252261 /// - Typically used to skip spaces etc. before tokens when parsing.<br/>
253262 /// - Pre-operators are efficient an only execute once while trying several lookahead operations.
254263 /// </summary>
255- public FexBuilder < T > GlobalPreOp ( Action < T > preOp ) {
264+ public FexBuilder < T > GlobalPreOp ( Action < T > ? preOp ) {
256265 _buildState . PreOp . SetAction ( preOp ) ;
257266 return this ;
258267 }
259268
269+ /// <summary>
270+ /// Binds the previously defined (via FlowExpression.DefSkip(...)) skip operation as pre-operator to all subsequent operators:<br/>
271+ /// - A pre-operator executes before an operator as an action on the context:<br/>
272+ /// - Typically used to skip spaces etc. before tokens when parsing.<br/>
273+ /// - Pre-operators are efficient an only execute once while trying several lookahead operations.
274+ /// </summary>
275+ public FexBuilder < T > SkipGlobalPreOp ( ) => GlobalPreOp ( _buildState . SkipOp ) ;
276+
260277
261278 /// <summary>
262279 /// Bind a pre-operator to the preceding operator:<br/>
0 commit comments