diff options
author | Steven Knight <knight@baldmt.com> | 2010-03-04 02:16:32 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-03-04 02:16:32 (GMT) |
commit | 1b399b87a54a7898e303c2c42785bc11bceada59 (patch) | |
tree | e074681c742958688517946f855a8fa11fe7288b /bin/SConsDoc.py | |
parent | 2af231cac62af5ff445e217b8cf35770f64af588 (diff) | |
download | SCons-1b399b87a54a7898e303c2c42785bc11bceada59.zip SCons-1b399b87a54a7898e303c2c42785bc11bceada59.tar.gz SCons-1b399b87a54a7898e303c2c42785bc11bceada59.tar.bz2 |
More enhancements for documenting functions:
* Add the support for global="0" and env="0" to SConsDoc.py.
* Remove unnecessary .IP lines before '\""" delimiters before the
next builder / tool / function entry.
* Add support for <variablelist> lists.
Diffstat (limited to 'bin/SConsDoc.py')
-rw-r--r-- | bin/SConsDoc.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index 72d8c1c..cd78195 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -114,7 +114,7 @@ import re import sys import xml.sax.handler -class Item: +class Item(object): def __init__(self, name): self.name = name self.sort_name = name.lower() @@ -134,7 +134,10 @@ class Builder(Item): pass class Function(Item): - pass + def __init__(self, name, global_signature, env_signature): + super(Function, self).__init__(name) + self.global_signature = global_signature + self.env_signature = env_signature class Tool(Item): def __init__(self, name): @@ -164,7 +167,7 @@ class Arguments: def __str__(self): s = ''.join(self.body).strip() result = [] - for m in re.findall('([a-zA-Z_]+|[^a-zA-Z_]+)', s): + for m in re.findall('([a-zA-Z/_]+|[^a-zA-Z/_]+)', s): if ' ' in m: m = '"%s"' % m result.append(m) @@ -296,7 +299,9 @@ class SConsDocHandler(xml.sax.handler.ContentHandler, try: function = self.functions[name] except KeyError: - function = Function(name) + function = Function(name, + attrs.get('global', "1"), + attrs.get('env', "1")) self.functions[name] = function self.begin_xxx(function) def end_scons_function(self): |