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