Prose.MaskPattern

References
public class Prose.MaskPattern
Defines a masking pattern.

Properties

CsBlockComment

#
public static Prose.MaskPattern CsBlockComment { get; }
Gets the masking pattern for C# block comments: /*...*/

CsCharLiteral

#
public static Prose.MaskPattern CsCharLiteral { get; }
Gets the masking pattern for C# char literals.

CsInterpolation

#
public static Prose.MaskPattern CsInterpolation { get; }
Gets the masking pattern for C# interpolated strings.

CsLineComment

#
public static Prose.MaskPattern CsLineComment { get; }
Gets the masking pattern for C# line comments: //...

CsStringLiteral

#
public static Prose.MaskPattern CsStringLiteral { get; }
Gets the masking pattern for C# string literals.

CsVerbatimLiteral

#
public static Prose.MaskPattern CsVerbatimLiteral { get; }
Gets the masking pattern for C# verbatim strings.

CurlyBraces

#
public static Prose.MaskPattern CurlyBraces { get; }
Gets the multi-line masking pattern for matched curly braces: {...}

Multiline

#
public bool Multiline { get; }
Gets whether the pattern is automatically terminated at the end of a new line.

Parentheses

#
public static Prose.MaskPattern Parentheses { get; }
Gets the multi-line masking pattern for matched parentheses: (...)

SquareBrackets

#
public static Prose.MaskPattern SquareBrackets { get; }
Gets the multi-line masking pattern for matched square brackets: [...]

TrackDepth

#
public bool TrackDepth { get; }
Gets whether the nesting of consecutive triggers is taken into account.

Trigger

#
public string Trigger { get; }
String that triggers this pattern.

Methods

AsMultiLine

#
public Prose.MaskPattern AsMultiLine()
Gets this pattern in a single line flavour.

AsSingleLine

#
public Prose.MaskPattern AsSingleLine()
Gets this pattern in a single line flavour.

EvaluateTerminus

#
public int EvaluateTerminus(CharIndexer indexer, int index)
Start tracking a string until this pattern terminates.
indexer (Prose.CharIndexer)String to track.
index (int)Tracking start index.
Index of final character in string still part of this pattern.

EvaluateTrigger

#
public bool EvaluateTrigger(CharIndexer indexer, int index)
Test whether a string matches the trigger of this pattern at the specified index.
indexer (Prose.CharIndexer)String indexer.
index (int)Potential index of trigger.
True if this pattern is triggered by the given index.

MultiLine

#
public static Prose.MaskPattern MultiLine(char trigger, char terminal)
Create a multi-line pattern.
trigger (char)Trigger character.
terminal (char)Terminal character.

MultiLine

#
public static Prose.MaskPattern MultiLine(string trigger, string terminal)
Create a multi-line pattern.
trigger (string)Trigger string.
terminal (string)Terminal string.

ReplaceTrigger

#
public Prose.MaskPattern ReplaceTrigger(string trigger)
Replace the trigger string in this pattern.
trigger (string)

SingleLine

#
public static Prose.MaskPattern SingleLine(char trigger, char terminal)
Create a single-line pattern.
trigger (char)Trigger character.
terminal (char)Terminal character.

SingleLine

#
public static Prose.MaskPattern SingleLine(char trigger)
Create a single-line pattern.
trigger (char)Trigger character.

SingleLine

#
public static Prose.MaskPattern SingleLine(string trigger, string terminal)
Create a single-line pattern.
trigger (string)Trigger string.
terminal (string)Terminal string.

ToString

#
public override string ToString()
Gets a vague description of this pattern. Doesn't show escapes or skips.
Object.ToString

WithDepthTracking

#
public Prose.MaskPattern WithDepthTracking()
Gets this pattern with trigger nesting enabled.

WithEscape

#
public Prose.MaskPattern WithEscape(char escape)
Add an escape character to this pattern.
escape (char)

WithoutDepthTracking

#
public Prose.MaskPattern WithoutDepthTracking()
Gets this pattern with trigger nesting disabled.

WithSkip

#
public Prose.MaskPattern WithSkip(string skip)
Add a skipping string to this pattern.
skip (string)

WithTerminal

#
public Prose.MaskPattern WithTerminal(char terminal)
Add a terminal character to this pattern.
terminal (char)

WithTerminal

#
public Prose.MaskPattern WithTerminal(string terminal)
Add a terminal string to this pattern.
terminal (string)