diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/generator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/generator.c b/src/generator.c index f32f468..333dd5b 100644 --- a/src/generator.c +++ b/src/generator.c | |||
@@ -161,7 +161,7 @@ void gen_check(const char name[], Scope scope) { | |||
161 | // ----- READ AND PRINT FUNCTIONS ----- | 161 | // ----- READ AND PRINT FUNCTIONS ----- |
162 | void gen_reade(const char name[], Scope scope) { | 162 | void gen_reade(const char name[], Scope scope) { |
163 | if (is_read_only(name, scope)) { | 163 | if (is_read_only(name, scope)) { |
164 | fprintf(stderr, "Symbol \"%s\" at line %d is read only.\n", name, scope); | 164 | fprintf(stderr, "Symbol \"%s\" at line %d is read only.\n", name, lineno); |
165 | exit(1); | 165 | exit(1); |
166 | } | 166 | } |
167 | 167 | ||
@@ -181,7 +181,7 @@ void gen_reade(const char name[], Scope scope) { | |||
181 | 181 | ||
182 | void gen_readc(const char name[], Scope scope) { | 182 | void gen_readc(const char name[], Scope scope) { |
183 | if (is_read_only(name, scope)) { | 183 | if (is_read_only(name, scope)) { |
184 | fprintf(stderr, "Symbol \"%s\" at line %d is read only.\n", name, scope); | 184 | fprintf(stderr, "Symbol \"%s\" at line %d is read only.\n", name, lineno); |
185 | exit(1); | 185 | exit(1); |
186 | } | 186 | } |
187 | 187 | ||
@@ -245,7 +245,7 @@ int gen_assign(const char ident[], Scope scope) { | |||
245 | int g_addr = glo_get_addr(ident); | 245 | int g_addr = glo_get_addr(ident); |
246 | 246 | ||
247 | if (is_read_only(ident, scope)) { | 247 | if (is_read_only(ident, scope)) { |
248 | fprintf(stderr, "Symbol \"%s\" at line %d is read only.\n", ident, scope); | 248 | fprintf(stderr, "Symbol \"%s\" at line %d is read only.\n", ident, lineno); |
249 | exit(1); | 249 | exit(1); |
250 | } | 250 | } |
251 | 251 | ||