summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2014-01-06 20:17:58 -0500
committerAdrian Thurston <thurston@complang.org>2014-01-06 20:17:58 -0500
commit4f9b5d9846e279ec546298ef99faf95cac21e183 (patch)
treede7d5507ed21f7f885e07c28a153a0e6307d0677 /src/parser.h
parent95a688ad149ab1c579d358daacd06d609b517dd6 (diff)
downloadcolm-4f9b5d9846e279ec546298ef99faf95cac21e183.tar.gz
added wrapper function for current namespace
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h
index a3829d55..37af7e7e 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -49,9 +49,13 @@ struct BaseParser
bool insideRegion()
{ return regionStack.length() > 0; }
+
Context *curContext()
{ return contextStack.length() == 0 ? 0 : contextStack.top(); }
+ Namespace *curNspace()
+ { return namespaceStack.top(); }
+
/* Lexical feedback. */
void init();