MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / get_token

Function get_token

sql/sql_lex.cc:572–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570/* make a copy of token before ptr and set yytoklen */
571
572static LEX_STRING get_token(Lex_input_stream *lip, uint skip, uint length)
573{
574 LEX_STRING tmp;
575 lip->yyUnget(); // ptr points now after last token char
576 tmp.length=lip->yytoklen=length;
577 tmp.str= lip->m_thd->strmake(lip->get_tok_start() + skip, tmp.length);
578
579 lip->m_cpp_text_start= lip->get_cpp_tok_start() + skip;
580 lip->m_cpp_text_end= lip->m_cpp_text_start + tmp.length;
581
582 return tmp;
583}
584
585/*
586 todo:

Callers 1

lex_one_tokenFunction · 0.85

Calls 4

yyUngetMethod · 0.80
strmakeMethod · 0.80
get_tok_startMethod · 0.80
get_cpp_tok_startMethod · 0.80

Tested by

no test coverage detected