aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grecs-lex.l6
-rw-r--r--src/grecs.h1
-rw-r--r--src/parser.c1
3 files changed, 6 insertions, 2 deletions
diff --git a/src/grecs-lex.l b/src/grecs-lex.l
index adff8a1..455203c 100644
--- a/src/grecs-lex.l
+++ b/src/grecs-lex.l
@@ -342,8 +342,10 @@ ident()
static void
qstring_locus_fixup()
{
- yylloc.beg.col++;
- yylloc.end.col--;
+ if (grecs_adjust_string_locations) {
+ yylloc.beg.col++;
+ yylloc.end.col--;
+ }
}
grecs_value_t *
diff --git a/src/grecs.h b/src/grecs.h
index 1581791..0b0d129 100644
--- a/src/grecs.h
+++ b/src/grecs.h
@@ -71,6 +71,7 @@ typedef struct grecs_locus {
} grecs_locus_t;
extern grecs_locus_t grecs_locus;
+extern int grecs_adjust_string_locations;
enum grecs_data_type {
grecs_type_void,
diff --git a/src/parser.c b/src/parser.c
index 4e315e5..d3ee19a 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -26,6 +26,7 @@ int grecs_error_count;
int grecs_default_port = 0;
int grecs_trace_flags = 0;
+int grecs_adjust_string_locations;
#ifndef GRECS_DEFAULT_PARSER
# define GRECS_DEFAULT_PARSER grecs_grecs_parser

Return to:

Send suggestions and report system problems to the System administrator.