示例#1
0
 public TemplateToken(TemplateTokenType type, int position, int lineNumber, string token)
 {
     Type       = type;
     Position   = position;
     LineNumber = lineNumber;
     Token      = token;
 }
 public TemplateTokenMatcher(ITokenMatcher tokenMatcher, TemplateTokenType tokenType, bool removeEmptyLine, string tokenId)
 {
     _tokenMatcher = tokenMatcher;
     _removeEmptyLine = removeEmptyLine;
     _tokenId = tokenId;
     _tokenType = tokenType;
 }
示例#3
0
 public TemplateTokenMatcher(ITokenMatcher tokenMatcher, TemplateTokenType tokenType, bool removeEmptyLine, string tokenId)
 {
     _tokenMatcher    = tokenMatcher;
     _removeEmptyLine = removeEmptyLine;
     _tokenId         = tokenId;
     _tokenType       = tokenType;
 }
示例#4
0
 public TemplateToken(string regex, TemplateTokenType tokenType, bool removeEmptyLine, string tokenId)
 {
     Regex           = regex;
     TokenType       = tokenType;
     RemoveEmptyLine = removeEmptyLine;
     TokenId         = tokenId;
 }
示例#5
0
        public TokenMatch(Regex regex, Match match, TemplateTokenType tokenType, bool removeEmptyLine, string tokenId)
        {
            _TokenType       = tokenType;
            _TokenId         = tokenId;
            _Match           = match;
            _RemoveEmptyLine = removeEmptyLine;
            #region _SubMatches = { ... }

            Group group = null;
            foreach (string groupName in regex.GetGroupNames())
            {
                group = match.Groups[groupName];
                if (group.Success)
                {
                    _SubMatches[groupName] = group.Value;
                }
            }

            #endregion
        }
 public TemplateToken(TemplateTokenType type, string value)
 {
     Type = type;
     Value = value;
 }
示例#7
0
 public void AddTokenMatcher(TemplateTokenType templateTokenType, ITokenMatcher tokenMatcher, string tokenId)
 {
     AddTokenMatcher(new TemplateTokenMatcher(tokenMatcher, templateTokenType, false, tokenId));
 }
示例#8
0
 public void AddTokenMatcher(TemplateTokenType templateTokenType, ITokenMatcher tokenMatcher, bool removeEmptyLine)
 {
     AddTokenMatcher(new TemplateTokenMatcher(tokenMatcher, templateTokenType, removeEmptyLine, null));
 }
示例#9
0
 public void AddTokenMatcher(TemplateTokenType templateTokenType, ITokenMatcher tokenMatcher)
 {
     AddTokenMatcher(new TemplateTokenMatcher(tokenMatcher, templateTokenType, false, null));
 }
示例#10
0
 public void AddTokenMatcher(TemplateTokenType templateTokenType, ITokenMatcher tokenMatcher, bool removeEmptyLine, string tokenId)
 {
     AddTokenMatcher(new TemplateTokenMatcher(tokenMatcher, templateTokenType, removeEmptyLine, tokenId));
 }
示例#11
0
 public TemplateToken(TemplateTokenType type, string value)
 {
     Type  = type;
     Value = value;
 }
示例#12
0
 public void AddToken(TemplateTokenType tokenType, string regex, bool stripEmptyLine, string tokenId)
 {
     _TokenList.Add(new TemplateToken(regex, tokenType, stripEmptyLine, tokenId));
 }
示例#13
0
 public void AddToken(TemplateTokenType tokenType, string regex, bool stripEmptyLine)
 {
     AddToken(tokenType, regex, stripEmptyLine, null);
 }