LispEngine.Lexing.Scanner.match C# (CSharp) Method

match() private static method

private static match ( TokenType tokenType, Action matchDelegate ) : Matcher
tokenType TokenType
matchDelegate Action
return Matcher
        private static Matcher match(TokenType tokenType, Action<Scanner> matchDelegate)
        {
            return s =>
                    {
                        matchDelegate(s);
                        TokenType? result = null;
                        if (s.sb.Length > 0)
                            result = tokenType;
                        return result;
                    };
        }

Same methods

Scanner::match ( ) : Token