pub enum Rule {
Show 173 variants
EOI,
var_decl_keyword,
fn_decl_keyword,
trait_decl_keyword,
return_keyword,
storage_keyword,
use_keyword,
as_keyword,
enum_keyword,
struct_keyword,
impl_keyword,
asm_keyword,
while_keyword,
match_keyword,
mut_keyword,
assign,
line_comment_open,
block_comment_open,
block_comment_close,
fn_returns,
path_separator,
include_keyword,
abi_keyword,
ref_keyword,
deref_keyword,
true_keyword,
false_keyword,
const_decl_keyword,
impurity_keyword,
size_of_type_keyword,
size_of_val_keyword,
program,
library,
library_name,
contract,
script,
predicate,
file_path,
include_statement,
alias,
call_path,
relative_call_path,
absolute_call_path,
call_path_,
relative_call_path_,
absolute_call_path_,
expr_inner,
parenthesized_expression,
unary_op_expr,
expr,
func_app,
type_args,
fn_args,
var_exp,
var_name_ident,
struct_field_access,
method_exp,
subfield_exp,
contract_call_params,
subfield_path,
sub_subfield_path,
fully_qualified_method,
call_item,
delineated_path,
array_index,
size_of_expr,
size_of_type_expr,
size_of_val_expr,
abi_cast,
abi_decl,
abi_name,
if_exp,
op,
unary_op,
literal_value,
boolean,
string,
typed_integer,
basic_integer,
u8_integer,
u16_integer,
u32_integer,
u64_integer,
byte,
binary_byte,
hex_byte,
hex_digit,
match_expression,
match_branch,
match_scrutinee,
catch_all,
scrutinee,
struct_scrutinee,
struct_scrutinee_fields,
struct_scrutinee_field,
field_scrutinee,
enum_scrutinee,
fn_args_scrutinee,
tuple_scrutinee,
code_block,
struct_expression,
struct_expr_fields,
array_exp,
array_elems,
declaration,
non_var_decl,
var_decl,
type_ascription,
fn_decl,
fn_signature,
var_lhs,
var_name,
var_tuple,
reassignment,
variable_reassignment,
struct_field_reassignment,
const_decl,
visibility,
struct_decl,
storage_decl,
storage_fields,
storage_field,
struct_name,
struct_fields,
struct_field_name,
enum_decl,
enum_fields,
enum_name,
enum_field_name,
impl_self,
fn_decl_params,
type_params,
fn_decl_param,
fn_decl_param_name,
fn_decl_name,
type_name,
str_type,
trait_bounds,
generic_type_param,
array_type,
return_statement,
expr_statement,
trait_decl,
trait_methods,
supertraits,
supertrait,
impl_trait,
use_statement,
relative_use_statement,
absolute_use_statement,
import_path,
import_items,
star,
self_keyword,
while_loop,
asm_expression,
asm_registers,
asm_register_declaration,
asm_op,
asm_register,
asm_immediate,
opcode,
tuple_type,
tuple_expr,
tuple_index,
control_flow,
WHITESPACE,
COMMENT,
block_comment,
line_comment,
char,
ident,
reserved_words,
}
Variants
EOI
var_decl_keyword
fn_decl_keyword
trait_decl_keyword
return_keyword
storage_keyword
use_keyword
as_keyword
enum_keyword
struct_keyword
impl_keyword
asm_keyword
while_keyword
match_keyword
mut_keyword
assign
line_comment_open
block_comment_open
block_comment_close
fn_returns
path_separator
include_keyword
abi_keyword
ref_keyword
deref_keyword
true_keyword
false_keyword
const_decl_keyword
impurity_keyword
size_of_type_keyword
size_of_val_keyword
program
library
library_name
contract
script
predicate
file_path
include_statement
alias
call_path
relative_call_path
absolute_call_path
call_path_
relative_call_path_
absolute_call_path_
expr_inner
parenthesized_expression
unary_op_expr
expr
func_app
type_args
fn_args
var_exp
var_name_ident
struct_field_access
method_exp
subfield_exp
contract_call_params
subfield_path
sub_subfield_path
fully_qualified_method
call_item
delineated_path
array_index
size_of_expr
size_of_type_expr
size_of_val_expr
abi_cast
abi_decl
abi_name
if_exp
op
unary_op
literal_value
boolean
string
typed_integer
basic_integer
u8_integer
u16_integer
u32_integer
u64_integer
byte
binary_byte
hex_byte
hex_digit
match_expression
match_branch
match_scrutinee
catch_all
scrutinee
struct_scrutinee
struct_scrutinee_fields
struct_scrutinee_field
field_scrutinee
enum_scrutinee
fn_args_scrutinee
tuple_scrutinee
code_block
struct_expression
struct_expr_fields
array_exp
array_elems
declaration
non_var_decl
var_decl
type_ascription
fn_decl
fn_signature
var_lhs
var_name
var_tuple
reassignment
variable_reassignment
struct_field_reassignment
const_decl
visibility
struct_decl
storage_decl
storage_fields
storage_field
struct_name
struct_fields
struct_field_name
enum_decl
enum_fields
enum_name
enum_field_name
impl_self
fn_decl_params
type_params
fn_decl_param
fn_decl_param_name
fn_decl_name
type_name
str_type
trait_bounds
generic_type_param
array_type
return_statement
expr_statement
trait_decl
trait_methods
supertraits
supertrait
impl_trait
use_statement
relative_use_statement
absolute_use_statement
import_path
import_items
star
self_keyword
while_loop
asm_expression
asm_registers
asm_register_declaration
asm_op
asm_register
asm_immediate
opcode
tuple_type
tuple_expr
tuple_index
control_flow
WHITESPACE
COMMENT
block_comment
line_comment
char
ident
reserved_words
Trait Implementations
sourceimpl Ord for Rule
impl Ord for Rule
sourceimpl Parser<Rule> for SwayParser
impl Parser<Rule> for SwayParser
sourceimpl PartialOrd<Rule> for Rule
impl PartialOrd<Rule> for Rule
sourcefn partial_cmp(&self, other: &Rule) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Rule
impl Eq for Rule
impl StructuralEq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more