diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-02-23 16:44:51 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-02-23 16:44:51 +0100 |
commit | 77ef611a5a6ee3bf7456d0fb5f26f708b8433971 (patch) | |
tree | 40c8823ef63a3ee116485d442c82a9902211006b /libstorycode/storycode.y | |
parent | e2523695223db657fb2c348a47b318b5c2d998ce (diff) |
Give line number in error message
Diffstat (limited to 'libstorycode/storycode.y')
-rw-r--r-- | libstorycode/storycode.y | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y index 1062794..b2b2afa 100644 --- a/libstorycode/storycode.y +++ b/libstorycode/storycode.y @@ -53,6 +53,7 @@ extern int sclex(); extern int scparse(); void scerror(struct scpctx *ctx, const char *s); + extern int lineno; %} %token STYLES SLIDE @@ -306,5 +307,5 @@ styledef: %% void scerror(struct scpctx *ctx, const char *s) { - printf("Storycode parse error at %i-%i\n", yylloc.first_line, yylloc.first_column); + printf("Storycode parse error at line %i\n", lineno); } |