Skip to content

Commit

Permalink
chore: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Sep 30, 2023
1 parent 9e89107 commit 98db189
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions crates/sol-type-parser/src/ident.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ use winnow::{
PResult,
};

/// The regular expression for a Solidity identfier.
/// The regular expression for a Solidity identifier.
///
/// <https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityLexer.Identifier>
pub const IDENT_REGEX: &str = "[a-zA-Z$_][a-zA-Z0-9$_]*";

/// Returns `true` if the given character is valid at the start of a Solidity
/// identfier.
/// identifier.
#[inline]
pub const fn is_id_start(c: char) -> bool {
matches!(c, 'a'..='z' | 'A'..='Z' | '_' | '$')
}

/// Returns `true` if the given character is valid in a Solidity identfier.
/// Returns `true` if the given character is valid in a Solidity identifier.
#[inline]
pub const fn is_id_continue(c: char) -> bool {
matches!(c, 'a'..='z' | 'A'..='Z' | '0'..='9' | '_' | '$')
Expand Down
10 changes: 5 additions & 5 deletions crates/syn-solidity/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ macro_rules! make_visitor {
}
}

fn visit_stmt_return(&mut v, rturn: &'ast $($mut)? StmtReturn) {
if let Some(rturn_expr) = & $($mut)? rturn.expr {
v.visit_expr(rturn_expr);
fn visit_stmt_return(&mut v, ret: &'ast $($mut)? StmtReturn) {
if let Some(ret_expr) = & $($mut)? ret.expr {
v.visit_expr(ret_expr);
}
}

Expand All @@ -99,8 +99,8 @@ macro_rules! make_visitor {
v.visit_variable_declaration(iden);
}
}
if let Some(rturn) = & $($mut)? stmt_try.returns {
v.visit_parameter_list(& $($mut)? rturn.returns);
if let Some(ret) = & $($mut)? stmt_try.returns {
v.visit_parameter_list(& $($mut)? ret.returns);
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/syn-solidity/src/yul/stmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub enum YulStmt {
/// A continue statement: `continue`.
Continue(Token![continue]),

/// A function defenition statement: `function f() { ... }`.
/// A function definition statement: `function f() { ... }`.
FunctionDef(YulFunctionDef),
}

Expand Down
2 changes: 1 addition & 1 deletion crates/syn-solidity/src/yul/type/evm_builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use syn::{

macro_rules! yul_evm_builtin_enum_builder {
($( $variant:ident($($token:tt)* ) ),* $(,)?) => {
/// Respresentation of an EVM builtin opcode.
/// Representation of an EVM builtin opcode.
///
/// Solidity Reference:
/// <https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityLexer.YulEVMBuiltin>
Expand Down

0 comments on commit 98db189

Please sign in to comment.