#include <language/command.h>
#include <language/lexer/lexer.h>
#include <language/lexer/variable-parser.h>
#include <language/command.h>
#include <language/lexer/lexer.h>
#include <language/lexer/variable-parser.h>
const char *file_name; /* File name. */
int line_number; /* Line number. */
struct substring text; /* Contents. */
const char *file_name; /* File name. */
int line_number; /* Line number. */
struct substring text; /* Contents. */
static void do_repeat_close (struct getl_interface *);
static bool always_false (const struct getl_interface *);
static const char *do_repeat_name (const struct getl_interface *);
static void do_repeat_close (struct getl_interface *);
static bool always_false (const struct getl_interface *);
static const char *do_repeat_name (const struct getl_interface *);
- getl_include_source (lex_get_source_stream (lexer), &block->parent);
+ getl_include_source (lex_get_source_stream (lexer),
+ &block->parent,
+ lex_current_syntax_mode (lexer),
+ lex_current_error_mode (lexer)
+ );
bool command_ends_before_line, command_ends_after_line;
/* Retrieve an input line and make a copy of it. */
bool command_ends_before_line, command_ends_after_line;
/* Retrieve an input line and make a copy of it. */
line->file_name = previous_file_name;
line->line_number = getl_source_location (lex_get_source_stream (lexer));
ss_alloc_substring_pool (&line->text, ds_ss (&text), block->pool);
line->file_name = previous_file_name;
line->line_number = getl_source_location (lex_get_source_stream (lexer));
ss_alloc_substring_pool (&line->text, ds_ss (&text), block->pool);
- lex_preprocess_line (&text, syntax,
+ lex_preprocess_line (&text,
+ lex_current_syntax_mode (lexer),
&command_ends_before_line,
&command_ends_after_line);
if (recognize_do_repeat (ds_ss (&text)))
{
&command_ends_before_line,
&command_ends_after_line);
if (recognize_do_repeat (ds_ss (&text)))
{
{
struct repeat_block *block = (struct repeat_block *) block_;
bool in_apos, in_quote, dot;
{
struct repeat_block *block = (struct repeat_block *) block_;
bool in_apos, in_quote, dot;
/* Strip trailing whitespace, check for & remove terminal dot. */
ds_rtrim (line, ss_cstr (CC_SPACES));
/* Strip trailing whitespace, check for & remove terminal dot. */
ds_rtrim (line, ss_cstr (CC_SPACES));
was obtained, false if the source is exhausted. */
static bool
do_repeat_read (struct getl_interface *interface,
was obtained, false if the source is exhausted. */
static bool
do_repeat_read (struct getl_interface *interface,
line = current_line (interface);
ds_assign_substring (output, line->text);
line = current_line (interface);
ds_assign_substring (output, line->text);