mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
eval: Split eval.c into smaller files
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/*
|
||||
* ex_eval.c: functions for Ex command line for the +eval feature.
|
||||
*/
|
||||
// TODO(ZyX-I): move to eval/executor
|
||||
|
||||
/// @file ex_eval.c
|
||||
///
|
||||
/// Functions for Ex command line for the +eval feature.
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@@ -779,7 +781,6 @@ void report_discard_pending(int pending, void *value)
|
||||
*/
|
||||
void ex_if(exarg_T *eap)
|
||||
{
|
||||
int error;
|
||||
int skip;
|
||||
int result;
|
||||
struct condstack *cstack = eap->cstack;
|
||||
@@ -800,6 +801,7 @@ void ex_if(exarg_T *eap)
|
||||
1] &
|
||||
CSF_ACTIVE));
|
||||
|
||||
bool error;
|
||||
result = eval_to_bool(eap->arg, &error, &eap->nextcmd, skip);
|
||||
|
||||
if (!skip && !error) {
|
||||
@@ -844,7 +846,6 @@ void ex_endif(exarg_T *eap)
|
||||
*/
|
||||
void ex_else(exarg_T *eap)
|
||||
{
|
||||
int error;
|
||||
int skip;
|
||||
int result;
|
||||
struct condstack *cstack = eap->cstack;
|
||||
@@ -901,6 +902,7 @@ void ex_else(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (eap->cmdidx == CMD_elseif) {
|
||||
bool error;
|
||||
result = eval_to_bool(eap->arg, &error, &eap->nextcmd, skip);
|
||||
/* When throwing error exceptions, we want to throw always the first
|
||||
* of several errors in a row. This is what actually happens when
|
||||
@@ -925,7 +927,7 @@ void ex_else(exarg_T *eap)
|
||||
*/
|
||||
void ex_while(exarg_T *eap)
|
||||
{
|
||||
int error;
|
||||
bool error;
|
||||
int skip;
|
||||
int result;
|
||||
struct condstack *cstack = eap->cstack;
|
||||
|
Reference in New Issue
Block a user