mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
viml/parser/expressions: Remove unused flag
This commit is contained in:
@@ -314,10 +314,6 @@ enum {
|
|||||||
/// When parsing expressions input by user bar is assumed to be a binary
|
/// When parsing expressions input by user bar is assumed to be a binary
|
||||||
/// operator and other two are spacings.
|
/// operator and other two are spacings.
|
||||||
kExprFlagsDisallowEOC = (1 << 1),
|
kExprFlagsDisallowEOC = (1 << 1),
|
||||||
/// Print errors when encountered
|
|
||||||
///
|
|
||||||
/// Without the flag they are only taken into account when parsing.
|
|
||||||
kExprFlagsPrintError = (1 << 2),
|
|
||||||
// WARNING: whenever you add a new flag, alter klee_assume() statement in
|
// WARNING: whenever you add a new flag, alter klee_assume() statement in
|
||||||
// viml_expressions_parser.c.
|
// viml_expressions_parser.c.
|
||||||
} ExprParserFlags;
|
} ExprParserFlags;
|
||||||
|
@@ -35,7 +35,7 @@ int main(const int argc, const char *const *const argv,
|
|||||||
{
|
{
|
||||||
char input[INPUT_SIZE];
|
char input[INPUT_SIZE];
|
||||||
uint8_t shift;
|
uint8_t shift;
|
||||||
int flags;
|
unsigned flags;
|
||||||
const bool peek = false;
|
const bool peek = false;
|
||||||
avoid_optimizing_out = argc;
|
avoid_optimizing_out = argc;
|
||||||
|
|
||||||
@@ -48,8 +48,7 @@ int main(const int argc, const char *const *const argv,
|
|||||||
klee_make_symbolic(&shift, sizeof(shift), "shift");
|
klee_make_symbolic(&shift, sizeof(shift), "shift");
|
||||||
klee_make_symbolic(&flags, sizeof(flags), "flags");
|
klee_make_symbolic(&flags, sizeof(flags), "flags");
|
||||||
klee_assume(shift < INPUT_SIZE);
|
klee_assume(shift < INPUT_SIZE);
|
||||||
klee_assume(
|
klee_assume(flags <= (kExprFlagsMulti|kExprFlagsDisallowEOC));
|
||||||
flags <= (kExprFlagsMulti|kExprFlagsDisallowEOC|kExprFlagsPrintError));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ParserLine plines[] = {
|
ParserLine plines[] = {
|
||||||
@@ -91,7 +90,7 @@ int main(const int argc, const char *const *const argv,
|
|||||||
};
|
};
|
||||||
kvi_init(pstate.reader.lines);
|
kvi_init(pstate.reader.lines);
|
||||||
|
|
||||||
const ExprAST ast = viml_pexpr_parse(&pstate, flags);
|
const ExprAST ast = viml_pexpr_parse(&pstate, (int)flags);
|
||||||
assert(ast.root != NULL || ast.err.msg);
|
assert(ast.root != NULL || ast.err.msg);
|
||||||
// Can’t possibly have more highlight tokens then there are bytes in string.
|
// Can’t possibly have more highlight tokens then there are bytes in string.
|
||||||
assert(kv_size(colors) <= INPUT_SIZE - shift);
|
assert(kv_size(colors) <= INPUT_SIZE - shift);
|
||||||
|
Reference in New Issue
Block a user