summaryrefslogtreecommitdiffstats
path: root/dimension/lexer.l
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-04-18 23:18:45 -0400
committerTavian Barnes <tavianator@gmail.com>2010-04-18 23:18:45 -0400
commit919121bdf572b632cc5bfbbee502664682b26ab8 (patch)
tree528a83bb716851152ebc12aee385417b8f407601 /dimension/lexer.l
parent004d63c0c199a1544dc9b3af9cdd3367a6969d23 (diff)
downloaddimension-919121bdf572b632cc5bfbbee502664682b26ab8.tar.xz
Give backtraces for diagnostics from macros and include files.
Partly this means that dmnsn_diagnostic() can't be called anywhere except during parsing, because the dmnsn_parse_location::parent pointers dangle.
Diffstat (limited to 'dimension/lexer.l')
-rw-r--r--dimension/lexer.l1
1 files changed, 1 insertions, 0 deletions
diff --git a/dimension/lexer.l b/dimension/lexer.l
index f4685b8..1abb4b8 100644
--- a/dimension/lexer.l
+++ b/dimension/lexer.l
@@ -56,6 +56,7 @@
llocp->first_line = llocp->last_line = yylineno; \
llocp->first_column = yycolumn; \
llocp->last_column = yycolumn + yyleng; \
+ llocp->parent = NULL; \
} while (0)
#define CALCULATE_COLUMN() do { yycolumn += yyleng; } while (0)