Antlr4.Runtime.Misc.IntervalSet.SetReadonly C# (CSharp) Method

SetReadonly() public method

public SetReadonly ( bool @readonly ) : void
@readonly bool
return void
        public virtual void SetReadonly(bool @readonly)
        {
            if (this.@readonly && !@readonly)
            {
                throw new InvalidOperationException("can't alter readonly IntervalSet");
            }
            this.@readonly = @readonly;
        }

Usage Example

Beispiel #1
0
 static IntervalSet()
 {
     CompleteCharSet.SetReadonly(true);
     EmptySet.SetReadonly(true);
 }