Re: line number variable?

Bram Moolenaar <[email protected]> Thu, 14 Oct 2004 20:52:16 +0200
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Cory Dodt wrote:

> Is there any way, either in Python or in AAP syntax, to get the recipe line
> number?  I would like to write some code like:
> 
> @for location in location_list:
> @  if os.path.isfile(location):
> ~     var = $location
> @assert hasattr(_no, 'var'), "var was !set at line %s of setup.aap"%_no.LINENO

No, currently that is not possible.

It could be added.  I think adding a Python function would work best.
The get_recipe_msg() function in Process.py shows how it's done.

> While we're at it, is there any way to find out what the name of the
> current recipe is?

It's stored in the same place, thus requires a same kind of solution.

-- 
hundred-and-one symptoms of being an internet addict:
144. You eagerly await the update of the "Cool Site of the Day."

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl