summaryrefslogtreecommitdiffstats
path: root/parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/parse.h b/parse.h
index 8648bc52..0dcf30a2 100644
--- a/parse.h
+++ b/parse.h
@@ -26,11 +26,16 @@ struct source_loc
std::ostream& operator << (std::ostream& o, const source_loc& loc);
+enum parse_context
+ {
+ con_unknown, con_probe, con_global, con_function, con_embedded
+ };
+
+
enum token_type
{
tok_junk, tok_identifier, tok_operator, tok_string, tok_number,
- tok_embedded
- // XXX: add tok_keyword throughout
+ tok_embedded, tok_keyword
};
@@ -90,6 +95,7 @@ private:
std::istream* free_input;
lexer input;
bool privileged;
+ parse_context context;
// preprocessing subordinate
std::vector<const token*> enqueued_pp;