mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 15:44:04 +00:00
early return; fix indentation
This commit is contained in:
@@ -263,13 +263,14 @@ gb_internal void check_did_you_mean_scope(String const &name, Scope *scope, char
|
||||
|
||||
gb_internal Entity *entity_from_expr(Ast *expr) {
|
||||
expr = unparen_expr(expr);
|
||||
if (expr != nullptr) {
|
||||
switch (expr->kind) {
|
||||
case Ast_Ident:
|
||||
return expr->Ident.entity;
|
||||
case Ast_SelectorExpr:
|
||||
return entity_from_expr(expr->SelectorExpr.selector);
|
||||
}
|
||||
if (expr == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
switch (expr->kind) {
|
||||
case Ast_Ident:
|
||||
return expr->Ident.entity;
|
||||
case Ast_SelectorExpr:
|
||||
return entity_from_expr(expr->SelectorExpr.selector);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user