NAME
PLS::Parser::Element
DESCRIPTION
This is an abstraction of a PPI::Element with additional functionality.
METHODS
ppi_line_number
This is the line number of the element according to PPI.
ppi_column_number
This is the column number of the element according to PPI.
lsp_line_number
This is the line number of the element according to the Language Server Protocol.
lsp_column_number
This is the column number of the element according to the Language Server Protocol.
location_info
This is information about the location of the element, to be stored in the index.
content
This is the content of the element. This is the same as PPI::Element::content.
name
This is the name of the element. This is the same as the result of content
, in the base class.
package_name
This finds a package name at the given column number inside this element.
method_name
This finds a method name in the current element.
class_method_package_and_name
This finds a class method within the current element and returns the class and method name.
subroutine_package_and_name
This finds a fully qualified function call within this element and returns the package and function name.
variable_name
This finds a variable in the current element and returns its name.
cursor_on_package
This determines if the cursor at the given column number is on a package name.
_extract_import
This extracts an import within a use
statement, which may be a package or function name.
_get_string_from_list
This finds the string in a list at a given column number.
_get_string_from_qw
This gets a string from a qw
quoted list at a given column number.
range
This provides the range where this element is located, in a format the Language Server Protocol can understand.
length
This returns the length of this element.
parent
This returns the parent element of this element, as a PLS::Parser::Element object.
previous_sibling
This returns the previous significant sibling of this element, as a PLS::Parser::Element object.
previous_sibling
This returns the next significant sibling of this element, as a PLS::Parser::Element object.
children
This returns all of this element's children, as PLS::Parser::Element objects.
tokens
This returns all the tokens in the current element, as PLS::Parser::Element objects. Tokens correspond to all of the PPI::Token objects in the current element.
element
Returns the PPI::Element object for this element.
type
Returns the type of PPI::Element that this element is associated with.