aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 9c3e5f9602..c67e0fcca2 100644
--- a/parse.y
+++ b/parse.y
@@ -45,6 +45,12 @@
#define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
#define YYFREE(ptr) rb_parser_free(parser, (ptr))
#define YYFPRINTF rb_parser_printf
+#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ rb_parser_printf(parser, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+#endif
#undef malloc
#undef realloc
#undef calloc