Struct Group
Represents a group in a Grammar.
public readonly struct Group : IEquatable<Group>
- Implements
Remarks
Groups are lexical constructs that begin and end with specific token symbols, contain arbitrary text or nested groups and are contained in one token symbol.
A typical use of groups is in implementing comments.
Properties
Attributes
The Group's GroupAttributes.
public GroupAttributes Attributes { get; }
Property Value
Container
The token symbol that represents the Group's content.
public TokenSymbol Container { get; }
Property Value
End
The token symbol that ends this Group.
public TokenSymbol End { get; }
Property Value
Name
The Group's name.
public string Name { get; }
Property Value
Nesting
public GroupNestingCollection Nesting { get; }
Property Value
Start
The token symbol that starts this Group.
public TokenSymbol Start { get; }
Property Value
Methods
Equals(Group)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Group other)
Parameters
other
GroupAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns a string describing the Group.
public override string ToString()
Returns
Operators
operator ==(Group, Group)
Compares two Groups for equality.
public static bool operator ==(Group left, Group right)
Parameters
Returns
operator !=(Group, Group)
Compares two Groups for inequality.
public static bool operator !=(Group left, Group right)