AjScript.Tests.Interpreter.LexerTests.ParseToken C# (CSharp) 메소드

ParseToken() 개인적인 정적인 메소드

private static ParseToken ( string text, TokenType type, string value ) : void
text string
type TokenType
value string
리턴 void
        private static void ParseToken(string text, TokenType type, string value)
        {
            using (Lexer lexer = new Lexer(text))
            {
                Token token = lexer.NextToken();

                Assert.IsNotNull(token);

                Assert.AreEqual(type, token.TokenType);
                Assert.AreEqual(value, token.Value);

                Assert.IsNull(lexer.NextToken());
            }
        }