Skip to content

Commit

Permalink
parser: apply @[direct_array_access] to is_ident_name
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Oct 14, 2024
1 parent 5786099 commit e48e3c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vlib/v/parser/parser.v
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,12 @@ fn (mut p Parser) check_js_name() string {
return name
}

@[direct_array_access]
fn is_ident_name(name string) bool {
if name.len == 0 || !util.name_char_table[name[0]] {
if name.len == 0 {
return false
}
if !util.name_char_table[name[0]] {
return false
}
for i in 1 .. name.len {
Expand Down

0 comments on commit e48e3c7

Please sign in to comment.