mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 09:48:19 +00:00
*: Fix linter errors
Big function in expressions.c may be refactored, if I ever catch the idea how to split it right.
This commit is contained in:
@@ -1814,8 +1814,8 @@ ExprAST viml_pexpr_parse(ParserState *const pstate, const int flags)
|
||||
|| ((*kv_Z(ast_stack, 1))->type != kExprNodeConcat
|
||||
&& ((*kv_Z(ast_stack, 1))->type
|
||||
!= kExprNodeConcatOrSubscript))))
|
||||
? kELFlagAllowFloat
|
||||
: 0));
|
||||
? kELFlagAllowFloat
|
||||
: 0));
|
||||
LexExprToken cur_token = viml_pexpr_next_token(
|
||||
pstate, want_node_to_lexer_flags[want_node] | lexer_additional_flags);
|
||||
if (cur_token.type == kExprLexEOC) {
|
||||
@@ -1876,7 +1876,7 @@ viml_pexpr_parse_process_token:
|
||||
// time.
|
||||
//
|
||||
// Here example will always contain a concat with "a:2" sucking colon,
|
||||
// making expression invalid both because there is no longer a spare colon
|
||||
// making expression invalid both because there is no longer a spare colon
|
||||
// for ternary and because concatenating dictionary with anything is not
|
||||
// valid. There are more cases when this will make a difference though.
|
||||
const bool node_is_key = (
|
||||
@@ -2853,7 +2853,7 @@ viml_pexpr_parse_end:
|
||||
}
|
||||
kvi_destroy(ast_stack);
|
||||
return ast;
|
||||
}
|
||||
} // NOLINT(readability/fn_size)
|
||||
|
||||
#undef NEW_NODE
|
||||
#undef HL
|
||||
|
@@ -189,7 +189,7 @@ typedef enum {
|
||||
kExprNodeCall, ///< Function call.
|
||||
/// Plain identifier: simple variable/function name
|
||||
///
|
||||
/// Looks like "string", "g:Foo", etc: consists from a single
|
||||
/// Looks like "string", "g:Foo", etc: consists from a single
|
||||
/// kExprLexPlainIdentifier token.
|
||||
kExprNodePlainIdentifier,
|
||||
/// Plain dictionary key, for use with kExprNodeConcatOrSubscript
|
||||
|
Reference in New Issue
Block a user