Skip to main content

Rule

Enum Rule 

Source
pub enum Rule {
Show 348 variants EOI, program, statements, simple_assignment, simple_method_call, simple_function_call, statement, empty_statement, standalone_expression, modified_statement, expression_statement, declaration_statement, block_statement, return_statement, last_statement, next_statement, redo_statement, continue_statement, tie_statement, untie_statement, tied_statement, labeled_block, try_catch_statement, catch_clause, catch_parameter, finally_clause, defer_statement, class_declaration, superclass, class_body, class_member, field_declaration, field_attributes, field_attribute, method_declaration, role_declaration, declaration, variable_declaration, constant_declaration, variable_list, if_statement, elsif_clause, else_clause, unless_statement, given_statement, given_block, when_clause, when_condition, default_clause, while_statement, until_statement, for_statement, foreach_statement, loop_variable_declarator, for_init, sub_declaration, sub_modifier, signature, signature_params, signature_param, positional_param, named_param, slurpy_param, type_constraint, default_value, prototype, prototype_args, prototype_arg, sigil, attributes, attribute_list, attribute, attribute_args, format_declaration, format_name, filehandle, format_lines, format_line, format_end, package_declaration, package_name, use_statement, require_statement, module_name, import_list, import_items, import_item, expression, assignment_expression, assignment_operator, assignment_eq, ternary_expression, logical_or_expression, logical_or_op, logical_xor_expression, logical_xor_op, defined_or_expression, logical_and_expression, logical_and_op, equality_expression, equality_op, relational_expression, relational_op, isa_expression, isa_operator, bitwise_expression, bitwise_string_expression, shift_expression, range_expression, range_op, additive_expression, additive_op, multiplicative_expression, multiplicative_op, exponential_expression, exponential_op, unary_expression, file_test_operator, postfix_expression, postfix_operator, postfix_dereference, array_access, hash_access, typeglob_slot_access, typeglob_slot, method_call, method_name, function_call, function_args, arg_list, increment, decrement, primary_expression, user_function_call, class_method_call, qualified_name_or_identifier, reference, scalar_reference, array_reference, hash_reference, subroutine_reference, glob_reference, dereference, scalar_dereference, array_dereference, hash_dereference, code_dereference, glob_dereference, array_ref, hash_ref, hash_elements, hash_element, list, list_elements, list_element, literal, special_literal, number, hex_number, oct_number, bin_number, float_number, int_number, string, single_quoted_string, single_string_content, double_quoted_string, double_string_content, double_string_part, dollar_before_dquote, at_before_dquote, double_string_chars, backtick_string, backtick_content, q_string, qq_string, qx_string, q_paren_content, q_paren_part, q_nested_parens, q_bracket_content, q_bracket_part, q_nested_brackets, q_brace_content, q_brace_part, q_nested_braces, q_angle_content, q_angle_part, q_nested_angles, q_delimiter, q_delimited_content, q_escape_sequence, qq_paren_content, qq_paren_part, qq_nested_parens, qq_bracket_content, qq_bracket_part, qq_nested_brackets, qq_brace_content, qq_brace_part, qq_nested_braces, qq_angle_content, qq_angle_part, qq_nested_angles, qq_delimiter, qq_delimited_content, qq_delimited_part, qq_escape_sequence, qx_paren_content, qx_paren_part, qx_nested_parens, qx_bracket_content, qx_bracket_part, qx_nested_brackets, qx_brace_content, qx_brace_part, qx_nested_braces, qx_angle_content, qx_angle_part, qx_nested_angles, qx_delimiter, qx_delimited_content, qx_escape_sequence, escape_sequence, interpolation, complex_scalar_interpolation, complex_array_interpolation, array_dereference_interpolation, hash_dereference_interpolation, variable, scalar_variable, array_variable, hash_variable, typeglob_variable, array_element, hash_element_access, variable_name, reserved_word_as_var, package_variable, special_variable, special_var_name, identifier, reserved_word, goto_target, qualified_name, label, bareword, regex, match_regex, m_regex, qr_regex, qr_slash_pattern, qr_exclaim_pattern, qr_hash_pattern, qr_paren_pattern, qr_paren_part, qr_nested_parens, qr_bracket_pattern, qr_bracket_part, qr_nested_brackets, qr_brace_pattern, qr_brace_part, qr_nested_braces, qr_angle_pattern, qr_angle_part, qr_nested_angles, match_regex_pattern, qr_regex_pattern, m_exclaim_pattern, m_hash_pattern, m_paren_pattern, m_paren_part, m_nested_parens, m_bracket_pattern, m_bracket_part, m_nested_brackets, m_brace_pattern, m_brace_part, m_nested_braces, m_angle_pattern, m_angle_part, m_nested_angles, m_delimited_pattern, regex_escape, regex_group, regex_group_content, regex_delimiter, regex_flags, delimiter, substitution, sub_pattern, replacement, transliteration, search_list, replace_list, trans_flags, heredoc, heredoc_indented, heredoc_delimiter, heredoc_single_quoted, heredoc_double_quoted, heredoc_backtick, heredoc_escaped, bare_heredoc_delimiter, glob, glob_pattern, readline, qw_list, qw_paren_items, qw_paren_part, qw_nested_parens, qw_bracket_items, qw_bracket_part, qw_nested_brackets, qw_brace_items, qw_brace_part, qw_nested_braces, qw_angle_items, qw_angle_part, qw_nested_angles, qw_delimiter, qw_delimited_items, qw_escape_sequence, anonymous_sub, block, version, semicolon, begin_block, end_block, check_block, init_block, unitcheck_block, do_block, eval_statement, goto_statement, statement_modifier, pod_section, builtin_list_op, builtin_list_op_name, list_op_args, list_op_arg, statement_boundary, data_section, end_section, comment, NEWLINE, WHITESPACE, heredoc_placeholder,
}

Variants§

§

EOI

End-of-input

§

program

§

statements

§

simple_assignment

§

simple_method_call

§

simple_function_call

§

statement

§

empty_statement

§

standalone_expression

§

modified_statement

§

expression_statement

§

declaration_statement

§

block_statement

§

return_statement

§

last_statement

§

next_statement

§

redo_statement

§

continue_statement

§

tie_statement

§

untie_statement

§

tied_statement

§

labeled_block

§

try_catch_statement

§

catch_clause

§

catch_parameter

§

finally_clause

§

defer_statement

§

class_declaration

§

superclass

§

class_body

§

class_member

§

field_declaration

§

field_attributes

§

field_attribute

§

method_declaration

§

role_declaration

§

declaration

§

variable_declaration

§

constant_declaration

§

variable_list

§

if_statement

§

elsif_clause

§

else_clause

§

unless_statement

§

given_statement

§

given_block

§

when_clause

§

when_condition

§

default_clause

§

while_statement

§

until_statement

§

for_statement

§

foreach_statement

§

loop_variable_declarator

§

for_init

§

sub_declaration

§

sub_modifier

§

signature

§

signature_params

§

signature_param

§

positional_param

§

named_param

§

slurpy_param

§

type_constraint

§

default_value

§

prototype

§

prototype_args

§

prototype_arg

§

sigil

§

attributes

§

attribute_list

§

attribute

§

attribute_args

§

format_declaration

§

format_name

§

filehandle

§

format_lines

§

format_line

§

format_end

§

package_declaration

§

package_name

§

use_statement

§

require_statement

§

module_name

§

import_list

§

import_items

§

import_item

§

expression

§

assignment_expression

§

assignment_operator

§

assignment_eq

§

ternary_expression

§

logical_or_expression

§

logical_or_op

§

logical_xor_expression

§

logical_xor_op

§

defined_or_expression

§

logical_and_expression

§

logical_and_op

§

equality_expression

§

equality_op

§

relational_expression

§

relational_op

§

isa_expression

§

isa_operator

§

bitwise_expression

§

bitwise_string_expression

§

shift_expression

§

range_expression

§

range_op

§

additive_expression

§

additive_op

§

multiplicative_expression

§

multiplicative_op

§

exponential_expression

§

exponential_op

§

unary_expression

§

file_test_operator

§

postfix_expression

§

postfix_operator

§

postfix_dereference

§

array_access

§

hash_access

§

typeglob_slot_access

§

typeglob_slot

§

method_call

§

method_name

§

function_call

§

function_args

§

arg_list

§

increment

§

decrement

§

primary_expression

§

user_function_call

§

class_method_call

§

qualified_name_or_identifier

§

reference

§

scalar_reference

§

array_reference

§

hash_reference

§

subroutine_reference

§

glob_reference

§

dereference

§

scalar_dereference

§

array_dereference

§

hash_dereference

§

code_dereference

§

glob_dereference

§

array_ref

§

hash_ref

§

hash_elements

§

hash_element

§

list

§

list_elements

§

list_element

§

literal

§

special_literal

§

number

§

hex_number

§

oct_number

§

bin_number

§

float_number

§

int_number

§

string

§

single_quoted_string

§

single_string_content

§

double_quoted_string

§

double_string_content

§

double_string_part

§

dollar_before_dquote

§

at_before_dquote

§

double_string_chars

§

backtick_string

§

backtick_content

§

q_string

§

qq_string

§

qx_string

§

q_paren_content

§

q_paren_part

§

q_nested_parens

§

q_bracket_content

§

q_bracket_part

§

q_nested_brackets

§

q_brace_content

§

q_brace_part

§

q_nested_braces

§

q_angle_content

§

q_angle_part

§

q_nested_angles

§

q_delimiter

§

q_delimited_content

§

q_escape_sequence

§

qq_paren_content

§

qq_paren_part

§

qq_nested_parens

§

qq_bracket_content

§

qq_bracket_part

§

qq_nested_brackets

§

qq_brace_content

§

qq_brace_part

§

qq_nested_braces

§

qq_angle_content

§

qq_angle_part

§

qq_nested_angles

§

qq_delimiter

§

qq_delimited_content

§

qq_delimited_part

§

qq_escape_sequence

§

qx_paren_content

§

qx_paren_part

§

qx_nested_parens

§

qx_bracket_content

§

qx_bracket_part

§

qx_nested_brackets

§

qx_brace_content

§

qx_brace_part

§

qx_nested_braces

§

qx_angle_content

§

qx_angle_part

§

qx_nested_angles

§

qx_delimiter

§

qx_delimited_content

§

qx_escape_sequence

§

escape_sequence

§

interpolation

§

complex_scalar_interpolation

§

complex_array_interpolation

§

array_dereference_interpolation

§

hash_dereference_interpolation

§

variable

§

scalar_variable

§

array_variable

§

hash_variable

§

typeglob_variable

§

array_element

§

hash_element_access

§

variable_name

§

reserved_word_as_var

§

package_variable

§

special_variable

§

special_var_name

§

identifier

§

reserved_word

§

goto_target

§

qualified_name

§

label

§

bareword

§

regex

§

match_regex

§

m_regex

§

qr_regex

§

qr_slash_pattern

§

qr_exclaim_pattern

§

qr_hash_pattern

§

qr_paren_pattern

§

qr_paren_part

§

qr_nested_parens

§

qr_bracket_pattern

§

qr_bracket_part

§

qr_nested_brackets

§

qr_brace_pattern

§

qr_brace_part

§

qr_nested_braces

§

qr_angle_pattern

§

qr_angle_part

§

qr_nested_angles

§

match_regex_pattern

§

qr_regex_pattern

§

m_exclaim_pattern

§

m_hash_pattern

§

m_paren_pattern

§

m_paren_part

§

m_nested_parens

§

m_bracket_pattern

§

m_bracket_part

§

m_nested_brackets

§

m_brace_pattern

§

m_brace_part

§

m_nested_braces

§

m_angle_pattern

§

m_angle_part

§

m_nested_angles

§

m_delimited_pattern

§

regex_escape

§

regex_group

§

regex_group_content

§

regex_delimiter

§

regex_flags

§

delimiter

§

substitution

§

sub_pattern

§

replacement

§

transliteration

§

search_list

§

replace_list

§

trans_flags

§

heredoc

§

heredoc_indented

§

heredoc_delimiter

§

heredoc_single_quoted

§

heredoc_double_quoted

§

heredoc_backtick

§

heredoc_escaped

§

bare_heredoc_delimiter

§

glob

§

glob_pattern

§

readline

§

qw_list

§

qw_paren_items

§

qw_paren_part

§

qw_nested_parens

§

qw_bracket_items

§

qw_bracket_part

§

qw_nested_brackets

§

qw_brace_items

§

qw_brace_part

§

qw_nested_braces

§

qw_angle_items

§

qw_angle_part

§

qw_nested_angles

§

qw_delimiter

§

qw_delimited_items

§

qw_escape_sequence

§

anonymous_sub

§

block

§

version

§

semicolon

§

begin_block

§

end_block

§

check_block

§

init_block

§

unitcheck_block

§

do_block

§

eval_statement

§

goto_statement

§

statement_modifier

§

pod_section

§

builtin_list_op

§

builtin_list_op_name

§

list_op_args

§

list_op_arg

§

statement_boundary

§

data_section

§

end_section

§

comment

§

NEWLINE

§

WHITESPACE

§

heredoc_placeholder

Implementations§

Source§

impl Rule

Source

pub fn all_rules() -> &'static [Rule]

Trait Implementations§

Source§

impl Clone for Rule

Source§

fn clone(&self) -> Rule

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Rule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Rule

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Rule

Source§

fn cmp(&self, other: &Rule) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl Parser<Rule> for PerlParser

Source§

fn parse<'i>(rule: Rule, input: &'i str) -> Result<Pairs<'i, Rule>, Error<Rule>>

Parses a &str starting from rule.
Source§

impl PartialEq for Rule

Source§

fn eq(&self, other: &Rule) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Rule

Source§

fn partial_cmp(&self, other: &Rule) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Rule

Source§

impl Eq for Rule

Source§

impl StructuralPartialEq for Rule

Auto Trait Implementations§

§

impl Freeze for Rule

§

impl RefUnwindSafe for Rule

§

impl Send for Rule

§

impl Sync for Rule

§

impl Unpin for Rule

§

impl UnsafeUnpin for Rule

§

impl UnwindSafe for Rule

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,