From b758ed8ab3189f6c9bbb83b37212f3e89ce747f9 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 9 Jul 2010 05:28:22 +0000 Subject: [PATCH] added AWk:getRunContext() --- qse/include/qse/awk/Awk.hpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/qse/include/qse/awk/Awk.hpp b/qse/include/qse/awk/Awk.hpp index 316be11e..43a5106b 100644 --- a/qse/include/qse/awk/Awk.hpp +++ b/qse/include/qse/awk/Awk.hpp @@ -1,5 +1,5 @@ /* - * $Id: Awk.hpp 328 2010-07-08 06:58:44Z hyunghwan.chung $ + * $Id: Awk.hpp 329 2010-07-08 11:28:22Z hyunghwan.chung $ * Copyright 2006-2009 Chung, Hyung-Hwan. This file is part of QSE. @@ -808,6 +808,30 @@ public: Source& out ///< deparsing target ); + /// + /// The getRunContext() funciton returns the execution context + /// returned by the parse() function. The returned context + /// is valid if parse() has been called. You may call this + /// function to get the context if you forgot to store it + /// in a call to parse(). + /// + const Awk::Run* getRunContext () const + { + return &runctx; + } + + /// + /// The getRunContext() funciton returns the execution context + /// returned by the parse() function. The returned context + /// is valid if parse() has been called. You may call this + /// function to get the context if you forgot to store it + /// in a call to parse(). + /// + Awk::Run* getRunContext () + { + return &runctx; + } + /// /// The loop() function executes the BEGIN block, pattern-action blocks, /// and the END block. The return value is stored into @a ret.