예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StateRule"/> structure
 /// </summary>
 /// <remarks>
 /// Internal to force external plugins to use the builder
 /// </remarks>
 /// <param name="regex">The regular expression to attempt to match</param>
 /// <param name="tokenType">The type of token that should be emitted when matched</param>
 /// <param name="action">An action to take when matched</param>
 internal StateRule(Regex regex, TokenType tokenType, StateAction action)
 {
     Regex     = regex;
     TokenType = tokenType;
     Action    = action;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StateRule"/> structure
 /// </summary>
 /// <remarks>
 /// Internal to force external plugins to use the builder
 /// </remarks>
 /// <param name="regex">The regular expression to attempt to match</param>
 /// <param name="tokenType">The type of token that should be emitted when matched</param>
 /// <param name="action">An action to take when matched</param>
 internal StateRule(Regex regex, TokenType tokenType, StateAction action)
 {
     Regex = regex;
     TokenType = tokenType;
     Action = action;
 }