File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ struct FindRequireConstantString : public Luau::AstVisitor {
35
35
std::vector<ExprCallRequire> list;
36
36
37
37
bool visit (class Luau ::AstNode* node) override {
38
- if (Luau::AstExprCall* call_node = dynamic_cast <Luau::AstExprCall*>(node )) {
38
+ if (Luau::AstExprCall* call_node = node-> as <Luau::AstExprCall>( )) {
39
39
Luau::AstExpr* func = call_node->func ;
40
40
41
- if (Luau::AstExprGlobal* func_node = dynamic_cast <Luau::AstExprGlobal*>(func )) {
41
+ if (Luau::AstExprGlobal* func_node = func-> as <Luau::AstExprGlobal>( )) {
42
42
if (strncmp (func_node->name .value , " require" , 7 ) == 0 ) {
43
43
Luau::AstExpr* args_0 = call_node->args .data [0 ];
44
44
45
- if (Luau::AstExprConstantString* const_string_node = dynamic_cast <Luau::AstExprConstantString*>(args_0 )) {
45
+ if (Luau::AstExprConstantString* const_string_node = args_0-> as <Luau::AstExprConstantString>( )) {
46
46
this ->list .push_back ({" " , const_string_node->value .data , Location (call_node->location )});
47
47
}
48
48
}
You can’t perform that action at this time.
0 commit comments