Skip to content

Commit

Permalink
Merge pull request #27 from slackhq/juno_241022_02__improve_doc_comments
Browse files Browse the repository at this point in the history
(minor) Improve doc comments
  • Loading branch information
junoatwork authored Oct 23, 2024
2 parents 796956e + 1b32620 commit 3c682e2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/analyzer/expr/expression_identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use oxidized::{aast, ast::PropOrMethod, ast_defs};

use crate::{scope_analyzer::ScopeAnalyzer, statements_analyzer::StatementsAnalyzer};

// gets a var id from a simple variable
/** Gets the identifier for a simple variable */
pub fn get_var_id(
conditional: &aast::Expr<(), ()>,
this_class_name: Option<&StrId>,
Expand Down Expand Up @@ -100,7 +100,7 @@ pub fn get_var_id(
}
}

// gets a the beginning var id from a chain
/** Gets the beginning var identifier from a chain */
pub(crate) fn get_root_var_id(conditional: &aast::Expr<(), ()>) -> Option<String> {
match &conditional.2 {
aast::Expr_::Lvar(var_expr) => Some(var_expr.1 .1.clone()),
Expand All @@ -110,8 +110,10 @@ pub(crate) fn get_root_var_id(conditional: &aast::Expr<(), ()>) -> Option<String
}
}

// gets a var id from variables but also array fetches
// and property fetches, which themselves can be nested
/**
* Gets a var identifier from variables but also array fetches
* and property fetches, which themselves can be nested
**/
pub(crate) fn get_dim_id(
conditional: &aast::Expr<(), ()>,
codebase: Option<(&CodebaseInfo, &Interner)>,
Expand Down

0 comments on commit 3c682e2

Please sign in to comment.