- Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#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)))
{
-do_repeat_filter (struct getl_interface *block_,
- struct string *line, enum getl_syntax syntax UNUSED)
+do_repeat_filter (struct getl_interface *interface, struct string *line)
/* 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));
return (block->cur_line != ll_null (&block->lines)
? ll_data (block->cur_line, struct repeat_line, ll)
: NULL);
return (block->cur_line != ll_null (&block->lines)
? ll_data (block->cur_line, struct repeat_line, ll)
: NULL);
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);