Farkle


DesigntimeFarkleExtensions Type

Extension methods for DesigntimeFarkles.

Most of these methods must be applied to the topmost designtime Farkle that will eventually be built. Use Cast first to use these functions on untyped designtime Farkles.

Static members

Static member Description

DesigntimeFarkleExtensions.AddBlockComment(df, commentStart, commentEnd)

Full Usage: DesigntimeFarkleExtensions.AddBlockComment(df, commentStart, commentEnd)

Parameters:
    df : 'T
    commentStart : string
    commentEnd : string

Returns: 'T

Adds a block comment to the given DesigntimeFarkle.

df : 'T
commentStart : string
commentEnd : string
Returns: 'T

DesigntimeFarkleExtensions.AddLineComment(df, commentStart)

Full Usage: DesigntimeFarkleExtensions.AddLineComment(df, commentStart)

Parameters:
    df : 'T
    commentStart : string

Returns: 'T

Adds a line comment to the given DesigntimeFarkle.

df : 'T
commentStart : string
Returns: 'T

DesigntimeFarkleExtensions.AddNoiseSymbol(df, name, regex)

Full Usage: DesigntimeFarkleExtensions.AddNoiseSymbol(df, name, regex)

Parameters:
    df : 'T
    name : string
    regex : Regex

Returns: 'T

Adds a symbol specified by the given Regex that will be ignored in input text, to the given DesigntimeFarkle.

df : 'T
name : string
regex : Regex
Returns: 'T

DesigntimeFarkleExtensions.AutoWhitespace(df, x)

Full Usage: DesigntimeFarkleExtensions.AutoWhitespace(df, x)

Parameters:
    df : 'T
    x : bool

Returns: 'T

Controls whether the given DesigntimeFarkle would automatically ignore whitespace in input text.

df : 'T
x : bool
Returns: 'T

DesigntimeFarkleExtensions.Build(df, ?ct, ?options)

Full Usage: DesigntimeFarkleExtensions.Build(df, ?ct, ?options)

Parameters:
Returns: RuntimeFarkle<'TResult>
df : DesigntimeFarkle<'TResult>

The designtime Farkle to build.

?ct : CancellationToken

Used to cancel the operation.

?options : BuildOptions

Additional options to configure the process.

Returns: RuntimeFarkle<'TResult>
OperationCanceledException ct was triggered.

DesigntimeFarkleExtensions.BuildUntyped(df, ?ct, ?options)

Full Usage: DesigntimeFarkleExtensions.BuildUntyped(df, ?ct, ?options)

Parameters:
Returns: RuntimeFarkle<obj>

Builds a DesigntimeFarkle into a syntax-checking Object}.

df : DesigntimeFarkle

The designtime Farkle to build.

?ct : CancellationToken

Used to cancel the operation.

?options : BuildOptions

Additional options to configure the process.

Returns: RuntimeFarkle<obj>
OperationCanceledException ct was triggered.

DesigntimeFarkleExtensions.CaseSensitive(df, ?x)

Full Usage: DesigntimeFarkleExtensions.CaseSensitive(df, ?x)

Parameters:
    df : 'T
    ?x : bool

Returns: 'T

Controls whether the given DesigntimeFarkle is case sensitive.

df : 'T
?x : bool
Returns: 'T

DesigntimeFarkleExtensions.Cast(df)

Full Usage: DesigntimeFarkleExtensions.Cast(df)

Parameters:
Returns: DesigntimeFarkle<obj>

The object df will return is undefined.

df : DesigntimeFarkle
Returns: DesigntimeFarkle<obj>

DesigntimeFarkleExtensions.Many(df, ?atLeastOne)

Full Usage: DesigntimeFarkleExtensions.Many(df, ?atLeastOne)

Parameters:
    df : DesigntimeFarkle<'TResult> - The designtime Farkle to recognize many times.
    ?atLeastOne : bool - Whether at least one occurrence is required. Defaults to false.

Returns: DesigntimeFarkle<'TCollection>

Creates a new DesigntimeFarkle{TCollection} that recognizes many occurrences of the given DesigntimeFarkle{TResult}.

df : DesigntimeFarkle<'TResult>

The designtime Farkle to recognize many times.

?atLeastOne : bool

Whether at least one occurrence is required. Defaults to false.

Returns: DesigntimeFarkle<'TCollection>

DesigntimeFarkleExtensions.Nullable(df)

Full Usage: DesigntimeFarkleExtensions.Nullable(df)

Parameters:
Returns: DesigntimeFarkle<Nullable<'TResult>>
df : DesigntimeFarkle<'TResult>
Returns: DesigntimeFarkle<Nullable<'TResult>>

DesigntimeFarkleExtensions.Optional(df)

Full Usage: DesigntimeFarkleExtensions.Optional(df)

Parameters:
Returns: DesigntimeFarkle<'TResult>

Creates a new DesigntimeFarkle{TResult} that might recognize the given one, or not. In the latter case, it returns the default value of the result type.

df : DesigntimeFarkle<'TResult>
Returns: DesigntimeFarkle<'TResult>

DesigntimeFarkleExtensions.Rename(df, name)

Full Usage: DesigntimeFarkleExtensions.Rename(df, name)

Parameters:
    df : 'T
    name : string

Returns: 'T

Changes the name of a DesigntimeFarkle{TResult}.

Useful for diagnostic purposes.

df : 'T
name : string
Returns: 'T

DesigntimeFarkleExtensions.Select(df, f)

Full Usage: DesigntimeFarkleExtensions.Select(df, f)

Parameters:
Returns: DesigntimeFarkle<'TConverted>

Creates a new DesigntimeFarkle{TResult} that transforms the output of the given one with the given delegate.

df : DesigntimeFarkle<'TResult>
f : Func<'TResult, 'TConverted>
Returns: DesigntimeFarkle<'TConverted>

DesigntimeFarkleExtensions.SeparatedBy(df, separator, ?atLeastOne)

Full Usage: DesigntimeFarkleExtensions.SeparatedBy(df, separator, ?atLeastOne)

Parameters:
    df : DesigntimeFarkle<'TResult> - The designtime Farkle to recognize many times.
    separator : DesigntimeFarkle - The designtime Farkle that separates instances of df.
    ?atLeastOne : bool - Whether at least one occurrence is required. Defaults to false.

Returns: DesigntimeFarkle<'TCollection>

Creates a new DesigntimeFarkle{TCollection} that recognizes many occurrences of the given DesigntimeFarkle{TResult}, separated by another DesigntimeFarkle.

df : DesigntimeFarkle<'TResult>

The designtime Farkle to recognize many times.

separator : DesigntimeFarkle

The designtime Farkle that separates instances of df.

?atLeastOne : bool

Whether at least one occurrence is required. Defaults to false.

Returns: DesigntimeFarkle<'TCollection>

DesigntimeFarkleExtensions.WithMetadata(df, metadata)

Full Usage: DesigntimeFarkleExtensions.WithMetadata(df, metadata)

Parameters:
Returns: 'T

Sets a custom GrammarMetadata object to a DesigntimeFarkle.

df : 'T
metadata : GrammarMetadata
Returns: 'T

DesigntimeFarkleExtensions.WithOperatorScope(df, opScope)

Full Usage: DesigntimeFarkleExtensions.WithOperatorScope(df, opScope)

Parameters:
Returns: 'T

Sets an OperatorScope to a DesigntimeFarkle. Any previous ones -if exist- are discarded.

df : 'T
opScope : OperatorScope
Returns: 'T