projects
/
zilutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added error messages displaying using source file name and line number
[zilutils.git]
/
zilasm
/
parser.h
diff --git
a/zilasm/parser.h
b/zilasm/parser.h
index 2ed9ae7f0d6d9f840d549df7ccbb95527f911050..007d2ffe48e09817d85b9cd51b283a85a064b185 100644
(file)
--- a/
zilasm/parser.h
+++ b/
zilasm/parser.h
@@
-1,7
+1,7
@@
/*
* parser.h -- part of ZilUtils/ZilAsm
*
/*
* parser.h -- part of ZilUtils/ZilAsm
*
- * Copyright (C) 2016, 2019 Jason Self <j@jxself.org>
+ * Copyright (C) 2016, 2019
, 2020
Jason Self <j@jxself.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@
-31,11
+31,21
@@
struct Instruction
void init_parser ();
void init_parser ();
-int parse_file
(
const char *filename);
+int parse_file
();//
const char *filename);
-extern unsigned g_number
OfI
nstructions;
+extern unsigned g_number
_of_i
nstructions;
#define MAX_NUMBER_OF_INSTRUCTIONS 65536
extern ZMemblock (*g_codes[MAX_NUMBER_OF_INSTRUCTIONS]);
#define MAX_NUMBER_OF_INSTRUCTIONS 65536
extern ZMemblock (*g_codes[MAX_NUMBER_OF_INSTRUCTIONS]);
+struct Parsing_Context
+{
+ string current_directory;
+ string current_file_name;
+};
+
+extern stack<Parsing_Context> g_parsing_contexts;
+extern unsigned g_currentLineNumber;
+extern bool g_haveErrors;
+
#endif /* ifndef ZILASM_PARSER */
#endif /* ifndef ZILASM_PARSER */