io.IoLexer.topType C# (CSharp) Method

topType() public method

public topType ( ) : IoTokenType
return IoTokenType
        public IoTokenType topType()
        {
            if (top() == null) return 0;
            return top().type;
        }

Usage Example

示例#1
0
文件: IoMessage.cs 项目: ypyf/io
        void parseArgs(IoLexer lexer)
        {
            lexer.pop();

            if (lexer.top() != null && lexer.top().isValidMessageName())
            {
                IoMessage arg = newParseNextMessageChain(this.state, lexer);
                addArg(arg);

                while (lexer.topType() == IoTokenType.COMMA_TOKEN)
                {
                    lexer.pop();

                    if (lexer.top() != null && lexer.top().isValidMessageName())
                    {
                        IoMessage arg2 = newParseNextMessageChain(this.state, lexer);
                        addArg(arg2);
                    }
                    else
                    {
                    }
                }
            }

            if (lexer.topType() != IoTokenType.CLOSEPAREN_TOKEN)
            {
                // TODO: Exception, missing close paren
            }
            lexer.pop();
        }
All Usage Examples Of io.IoLexer::topType