Module ZestyParser.Tags
Version: 0.8.0
Author: Adam Atlas
Contact:
adam@atlas.st
Tags is a utility module providing an easy way to label objects in
abstract parse trees without defining a class for each one. It supersedes
the AHT
module.
This module provides a global "Tags" object; you create a
tag by accessing any attribute on it. A tag is a callable object,
suitable for use as an AbstractToken
to
parameter,
or, if it is more convenient (e.g. when you must use
>>
), a callback. Later, you can check if a given tag
has been applied to an object by checking for membership with
in
. For example:
>>> l = [1, 2, 3]
>>> l in Tags.thing
False
>>> Tags.thing(l)
[1, 2, 3]
>>> l in Tags.thing
True
Copyright: Copyright 2006-2007 Adam Atlas. Released under the MIT license (see
LICENSE.txt).
Variable Summary |
_Env |
Tags = <ZestyParser.Tags._Env object at 0x59a8d0>
|
Tags
-
- Type:
-
_Env
- Value:
<ZestyParser.Tags._Env object at 0x59a8d0>
|
|