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;
        }
Exemple #2
0
 protected Indent(MatchableTokenKind token, ScopePerToken scopeEmitType)
 {
     Token         = token ?? throw new ArgumentNullException(nameof(token));
     ScopePerToken = scopeEmitType;
 }
Exemple #3
0
 public static Indent Predefined(MatchableTokenKind token, int predefinedValue, ScopePerToken scopeEmitType = ScopePerToken.None) => new PredefinedIndent(token, scopeEmitType, predefinedValue);
Exemple #4
0
 public static Indent LexemeLength(MatchableTokenKind token, ScopePerToken scopeEmitType = ScopePerToken.None) => new LexemeLengthIndent(token, scopeEmitType);
 public LexemeLengthIndent(MatchableTokenKind token, ScopePerToken scopeEmitType)
     : base(token, scopeEmitType)
 {
 }