Method: YARD::Parser::SourceParser.tokenize

Defined in:
lib/yard/parser/source_parser.rb

.tokenize(content, ptype = parser_type) ⇒ Array

Tokenizes but does not parse the block of code

Parameters:

  • content (String)

    the block of code to tokenize

  • ptype (Symbol) (defaults to: parser_type)

    the parser type to use. See parser_type.

Returns:

  • (Array)

    a list of tokens

[View source]

125
126
127
# File 'lib/yard/parser/source_parser.rb', line 125

def tokenize(content, ptype = parser_type)
  new(ptype).tokenize(content)
end