We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76faea7 commit 391729dCopy full SHA for 391729d
1 file changed
crates/emmylua_parser/src/syntax/node/lua/expr.rs
@@ -331,7 +331,20 @@ impl LuaIndexExpr {
331
332
return Some(LuaIndexKey::Expr(LuaExpr::cast(node).unwrap()));
333
}
334
- _ => return None,
+ _ => {
335
+ if let Some(token) = child.as_token()
336
+ && matches!(
337
+ token.kind().to_token(),
338
+ LuaTokenKind::TkWhitespace
339
+ | LuaTokenKind::TkEndOfLine
340
+ | LuaTokenKind::TkShortComment
341
+ | LuaTokenKind::TkLongComment
342
+ )
343
+ {
344
+ continue;
345
+ }
346
+ return None;
347
348
349
} else if let Some(token) = child.as_token() {
350
if token.kind() == LuaTokenKind::TkLeftBracket.into() {
0 commit comments