public PredefinedIndent(MatchableTokenKind token, ScopePerToken scopeEmitType, int indent) : base(token, scopeEmitType) { if (indent < 1) { throw new ArgumentException("Predefined indeet value should not be less than 1.", nameof(indent)); } _indent = indent; }
protected Indent(MatchableTokenKind token, ScopePerToken scopeEmitType) { Token = token ?? throw new ArgumentNullException(nameof(token)); ScopePerToken = scopeEmitType; }
public static Indent Predefined(MatchableTokenKind token, int predefinedValue, ScopePerToken scopeEmitType = ScopePerToken.None) => new PredefinedIndent(token, scopeEmitType, predefinedValue);
public static Indent LexemeLength(MatchableTokenKind token, ScopePerToken scopeEmitType = ScopePerToken.None) => new LexemeLengthIndent(token, scopeEmitType);
public LexemeLengthIndent(MatchableTokenKind token, ScopePerToken scopeEmitType) : base(token, scopeEmitType) { }