Functions§
- parse_
assert_ stmt - Parse an
assertstatement. - parse_
fn_ def - Parse a function definition. The optional
pubqualifier must be parsed by the caller, and passed in. Next token must beunsafeorfn. - parse_
fn_ sig - Parse a function definition without a body. The optional
pubqualifier must be parsed by the caller, and passed in. Next token must beunsafeorfn. - parse_
for_ stmt - Parse a
forstatement. - parse_
generic_ param - Parse a single generic function parameter (eg.
T:SomeTraitinfn foo<T: SomeTrait>(some_arg: u256) -> bool). # Panics Panics if the first token isn’tName. - parse_
generic_ params - Parse an angle-bracket-wrapped list of generic arguments (eg.
<T, R: SomeTrait>infn foo<T, R: SomeTrait>(some_arg: u256) -> bool). # Panics Panics if the first token isn’t<. - parse_
if_ stmt - Parse an
ifstatement. - parse_
match_ arms - parse_
match_ stmt - Parse a
matchstatement. - parse_
pattern - parse_
return_ stmt - Parse a
returnstatement. - parse_
revert_ stmt - Parse a
revertstatement. - parse_
single_ word_ stmt - Parse a
continue,break,pass, orrevertstatement. - parse_
stmt - Parse a function-level statement.
- parse_
unsafe_ block - Parse an
unsafeblock. - parse_
while_ stmt - Parse a
whilestatement.