Class MatchRule
- Namespace
- CStructSharp
- Assembly
- CStructSharp.dll
One recognition rule and whether a prepared matcher checks it.
public sealed record MatchRule : IEquatable<MatchRule>
- Inheritance
-
MatchRule
- Implements
- Inherited Members
Constructors
MatchRule(string, string, string?, bool, string)
One recognition rule and whether a prepared matcher checks it.
public MatchRule(string Field, string Kind, string? Label, bool Checked, string Reason)
Parameters
FieldstringDeclaring field name.
KindstringThe declaration keyword: magic, expect or supports.
LabelstringOptional authored label.
CheckedboolWhether recognition evaluates this rule.
ReasonstringWhy the rule is checked or excluded; recognition never promises successful parsing.
Properties
Checked
Whether recognition evaluates this rule.
public bool Checked { get; init; }
Property Value
Field
Declaring field name.
public string Field { get; init; }
Property Value
Kind
The declaration keyword: magic, expect or supports.
public string Kind { get; init; }
Property Value
Label
Optional authored label.
public string? Label { get; init; }
Property Value
Reason
Why the rule is checked or excluded; recognition never promises successful parsing.
public string Reason { get; init; }
Property Value
Methods
Deconstruct(out string, out string, out string?, out bool, out string)
public void Deconstruct(out string Field, out string Kind, out string? Label, out bool Checked, out string Reason)
Parameters
Equals(MatchRule?)
public bool Equals(MatchRule? other)
Parameters
otherMatchRule
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MatchRule?, MatchRule?)
public static bool operator ==(MatchRule? left, MatchRule? right)
Parameters
Returns
operator !=(MatchRule?, MatchRule?)
public static bool operator !=(MatchRule? left, MatchRule? right)