summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commentscan.l4
-rw-r--r--src/context.cpp30
-rw-r--r--src/doctokenizer.l4
-rw-r--r--src/entry.h4
-rw-r--r--src/memberdef.cpp46
-rw-r--r--src/memberdef.h4
-rw-r--r--src/scanner.l4
-rw-r--r--src/tclscanner.l326
-rw-r--r--src/xmlgen.cpp16
9 files changed, 389 insertions, 49 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index bd20bf0..a42f6ce 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -914,7 +914,9 @@ FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+@&#]
FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]*"\"")
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
-CITEID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-:/]*
+CITESCHAR [a-z_A-Z\x80-\xFF]
+CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/]*
+CITEID {CITESCHAR}*{CITEECHAR}+("."{CITESCHAR}*{CITEECHAR}+)*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*("::"|"."){BN}*)*)((~{BN}*)?{ID})
TMPLSPEC "<"{BN}*[^>]+{BN}*">"
diff --git a/src/context.cpp b/src/context.cpp
index 05e2a7f..541cb74 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -2766,7 +2766,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addProperty("isExplicit", this,&Private::isExplicit);
addProperty("isMutable", this,&Private::isMutable);
addProperty("isGettable", this,&Private::isGettable);
+ addProperty("isPrivateGettable", this,&Private::isPrivateGettable);
+ addProperty("isProtectedGettable", this,&Private::isProtectedGettable);
addProperty("isSettable", this,&Private::isSettable);
+ addProperty("isPrivateSettable", this,&Private::isPrivateSettable);
+ addProperty("isProtectedSettable", this,&Private::isProtectedSettable);
addProperty("isReadable", this,&Private::isReadable);
addProperty("isWritable", this,&Private::isWritable);
addProperty("isAddable", this,&Private::isAddable);
@@ -2855,8 +2859,12 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
m_cache.propertyAttrs.reset(TemplateList::alloc());
if (md && md->isProperty())
{
- if (md->isGettable()) m_cache.propertyAttrs->append("get");
- if (md->isSettable()) m_cache.propertyAttrs->append("set");
+ if (md->isGettable()) m_cache.propertyAttrs->append("get");
+ if (md->isPrivateGettable()) m_cache.propertyAttrs->append("private get");
+ if (md->isProtectedGettable()) m_cache.propertyAttrs->append("protected get");
+ if (md->isSettable()) m_cache.propertyAttrs->append("set");
+ if (md->isPrivateSettable()) m_cache.propertyAttrs->append("private set");
+ if (md->isProtectedSettable()) m_cache.propertyAttrs->append("protected set");
}
m_cache.eventAttrs.reset(TemplateList::alloc());
if (md && md->isEvent())
@@ -2948,12 +2956,28 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
TemplateVariant isGettable() const
{
- return m_memberDef->isSettable();
+ return m_memberDef->isGettable();
+ }
+ TemplateVariant isPrivateGettable() const
+ {
+ return m_memberDef->isPrivateGettable();
+ }
+ TemplateVariant isProtectedGettable() const
+ {
+ return m_memberDef->isProtectedGettable();
}
TemplateVariant isSettable() const
{
return m_memberDef->isSettable();
}
+ TemplateVariant isPrivateSettable() const
+ {
+ return m_memberDef->isPrivateSettable();
+ }
+ TemplateVariant isProtectedSettable() const
+ {
+ return m_memberDef->isProtectedSettable();
+ }
TemplateVariant isReadable() const
{
return m_memberDef->isReadable();
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 7ffbbb3..3bd2058 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -333,7 +333,9 @@ BLANK [ \t\r]
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
PHPTYPE [\\:a-z_A-Z0-9\x80-\xFF\-]+
-CITEID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-:/]*
+CITESCHAR [a-z_A-Z\x80-\xFF]
+CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/]*
+CITEID {CITESCHAR}*{CITEECHAR}+("."{CITESCHAR}*{CITEECHAR}+)*
MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
LISTITEM {BLANK}*[-]("#")?{WS}
diff --git a/src/entry.h b/src/entry.h
index a861906..3e5f3d7 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -135,6 +135,10 @@ class Entry
static const uint64 Singleton = (1ULL<<14); // UNO IDL
// member specifiers (add new items to the beginning)
+ static const uint64 PrivateGettable = (1ULL<<20); // C# private getter
+ static const uint64 ProtectedGettable = (1ULL<<21); // C# protected getter
+ static const uint64 PrivateSettable = (1ULL<<22); // C# private setter
+ static const uint64 ProtectedSettable = (1ULL<<23); // C# protected setter
static const uint64 Inline = (1ULL<<24);
static const uint64 Explicit = (1ULL<<25);
static const uint64 Mutable = (1ULL<<26);
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 9ef3515..1069b3b 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1729,15 +1729,27 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.docify(" [implementation]");
ol.endTypewriter();
}
+
+ bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
- if (isProperty() && (isSettable() || isGettable()))
+ if (isProperty() && (isSettable() || isGettable() ||
+ isPrivateSettable() || isPrivateGettable() ||
+ isProtectedSettable() || isProtectedGettable()))
{
ol.writeLatexSpacing();
ol.startTypewriter();
ol.docify(" [");
QStrList sl;
- if (isGettable()) sl.append("get");
- if (isSettable()) sl.append("set");
+
+ if (isGettable()) sl.append("get");
+ if (isProtectedGettable()) sl.append("protected get");
+ if (isSettable()) sl.append("set");
+ if (isProtectedSettable()) sl.append("protected set");
+ if (extractPrivate)
+ {
+ if (isPrivateGettable()) sl.append("private get");
+ if (isPrivateSettable()) sl.append("private set");
+ }
const char *s=sl.first();
while (s)
{
@@ -1940,6 +1952,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
//ol.docify(" [");
SrcLangExt lang = getLanguage();
bool optVhdl = lang==SrcLangExt_VHDL;
+ bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
if (optVhdl)
{
sl.append(VhdlDocGen::trTypeString(getMemberSpecifiers()));
@@ -1955,7 +1968,14 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
if (isMutable()) sl.append("mutable");
if (isStatic()) sl.append("static");
if (isGettable()) sl.append("get");
+ if (isProtectedGettable()) sl.append("protected get");
if (isSettable()) sl.append("set");
+ if (isProtectedSettable()) sl.append("protected set");
+ if (extractPrivate)
+ {
+ if (isPrivateGettable()) sl.append("private get");
+ if (isPrivateSettable()) sl.append("private set");
+ }
if (isAddable()) sl.append("add");
if (!isUNOProperty() && isRemovable()) sl.append("remove");
if (isRaisable()) sl.append("raise");
@@ -4193,11 +4213,31 @@ bool MemberDef::isGettable() const
return (m_impl->memSpec&Entry::Gettable)!=0;
}
+bool MemberDef::isPrivateGettable() const
+{
+ return (m_impl->memSpec&Entry::PrivateGettable)!=0;
+}
+
+bool MemberDef::isProtectedGettable() const
+{
+ return (m_impl->memSpec&Entry::ProtectedGettable)!=0;
+}
+
bool MemberDef::isSettable() const
{
return (m_impl->memSpec&Entry::Settable)!=0;
}
+bool MemberDef::isPrivateSettable() const
+{
+ return (m_impl->memSpec&Entry::PrivateSettable)!=0;
+}
+
+bool MemberDef::isProtectedSettable() const
+{
+ return (m_impl->memSpec&Entry::ProtectedSettable)!=0;
+}
+
bool MemberDef::isAddable() const
{
return (m_impl->memSpec&Entry::Addable)!=0;
diff --git a/src/memberdef.h b/src/memberdef.h
index 3259102..b3c671f 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -123,7 +123,11 @@ class MemberDef : public Definition
bool isExplicit() const;
bool isMutable() const;
bool isGettable() const;
+ bool isPrivateGettable() const;
+ bool isProtectedGettable() const;
bool isSettable() const;
+ bool isPrivateSettable() const;
+ bool isProtectedSettable() const;
bool isReadable() const;
bool isWritable() const;
bool isAddable() const;
diff --git a/src/scanner.l b/src/scanner.l
index a39d02e..50e3b18 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -6129,6 +6129,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(FindMembers);
}
}
+<CSAccessorDecl>"private "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::PrivateSettable; }
+<CSAccessorDecl>"protected "{BN}*"set" { if (curlyCount==0) current->spec |= Entry::ProtectedSettable; }
+<CSAccessorDecl>"private "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::PrivateGettable; }
+<CSAccessorDecl>"protected "{BN}*"get" { if (curlyCount==0) current->spec |= Entry::ProtectedGettable; }
<CSAccessorDecl>"set" { if (curlyCount==0) current->spec |= Entry::Settable; }
<CSAccessorDecl>"get" { if (curlyCount==0) current->spec |= Entry::Gettable; }
<CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; }
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 48e8214..88e3d1d 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -534,6 +534,24 @@ static void tcl_name(const QCString &ns0, const QCString &name0, QCString &ns, Q
}
}
+//! Check name. Strip namespace qualifiers from name0 if inside inlined code segment.
+// @return 'ns' and 'name' of given current 'ns0' and 'name0'
+static void tcl_name_SnippetAware(const QCString &ns0, const QCString &name0, QCString &ns, QCString &name)
+{
+ // If we are inside an inlined code snippet then ns0
+ // already containes the complete namespace path.
+ // Any namespace qualifiers in name0 are redundant.
+ int i = name0.findRev("::");
+ if (i>=0 && tcl.memberdef)
+ {
+ tcl_name(ns0, name0.mid(i+2), ns, name);
+ }
+ else
+ {
+ tcl_name(ns0, name0, ns, name);
+ }
+}
+
// Check and return namespace entry.
// @return namespace entry
Entry* tcl_entry_namespace(const QCString ns)
@@ -714,6 +732,40 @@ static void tcl_codify_cmd(const char *s,int i)
{
tcl_codify(s,(*tcl.list_commandwords.at(i)).utf8());
}
+//! codify a string token
+//
+// codifies string according to type.
+// Starts a new scan context if needed (*myScan==0 and type == "script").
+// Returns NULL or the created scan context.
+//
+static tcl_scan *tcl_codify_token(tcl_scan *myScan, const QCString type, const QCString string)
+{
+ if (myScan != NULL)
+ {
+ if (type != NULL)
+ {
+ myScan->after << type << string;
+ }
+ else
+ {
+ myScan->after << "NULL" << string;
+ }
+ }
+ else
+ {
+ if (qstrcmp(type, "script") == 0)
+ {
+ myScan = tcl.scan.at(0);
+ myScan = tcl_scan_start('?', string,
+ myScan->ns, myScan->entry_cl, myScan->entry_fn);
+ }
+ else
+ {
+ tcl_codify((const char*)type, string);
+ }
+ }
+ return myScan;
+}
//-----------------------------------------------------------------------------
#undef YY_INPUT
@@ -1716,14 +1768,7 @@ static tcl_scan *tcl_command_ARG(tcl_scan *myScan, unsigned int i, bool ignoreOu
if (i%2 != 0)
{
// handle white space
- if (myScan!=NULL)
- {
- myScan->after << "NULL" << myName;
- }
- else
- {
- tcl_codify(NULL,myName);
- }
+ myScan = tcl_codify_token(myScan, "NULL", myName);
}
else
{
@@ -1766,29 +1811,13 @@ static tcl_scan *tcl_command_ARG(tcl_scan *myScan, unsigned int i, bool ignoreOu
{
// the first opening bracket, output what we have so far
myStr+=c;
- if (myScan!=NULL)
- {
- myScan->after << "NULL" << myStr;
- }
- else
- {
- tcl_codify(NULL,myStr);
- }
+ myScan = tcl_codify_token(myScan, "NULL", myStr);
myStr="";
}
else if (c==']' && !backslashed && insideBrackets==0 && insideBraces==0)
{
// the last closing bracket, start recursion, switch to deferred
- if (myScan!=NULL)
- {
- myScan->after << "script" << myStr;
- }
- else
- {
- myScan=tcl.scan.at(0);
- myScan = tcl_scan_start('?',myStr,
- myScan->ns,myScan->entry_cl,myScan->entry_fn);
- }
+ myScan = tcl_codify_token(myScan, "script", myStr);
myStr="";
myStr+=c;
}
@@ -1797,23 +1826,174 @@ static tcl_scan *tcl_command_ARG(tcl_scan *myScan, unsigned int i, bool ignoreOu
myStr+=c;
}
}
- if (myScan!=NULL)
+ if (i == 0 && myScan == NULL)
{
- myScan->after << "NULL" << myStr;
+ tcl_codify_link(myStr);
}
else
{
- if (i==0)
+ myScan = tcl_codify_token(myScan, "NULL", myStr);
+ }
+ }
+ return (myScan);
+}
+
+//! Handle internal tcl commands.
+// "eval arg ?arg ...?"
+static void tcl_command_EVAL()
+{
+D
+ tcl_codify_cmd("keyword", 0);
+ tcl_scan *myScan = tcl.scan.at(0);
+ QCString myString = "";
+ // we simply rescan the line without the eval
+ // we include leading whitespace because tcl_scan_start will examine
+ // the first char. If it finds a bracket it will assume one expression in brackets.
+ // Example: eval [list set] [list NotInvoked] [Invoked NotInvoked]
+ for (unsigned int i = 1; i < tcl.list_commandwords.count(); i++)
+ {
+ myString += (*tcl.list_commandwords.at(i)).utf8();
+ }
+ myScan = tcl_scan_start('?', myString,
+ myScan->ns, myScan->entry_cl, myScan->entry_fn);
+}
+
+//! Handle internal tcl commands.
+// switch ?options? string pattern body ?pattern body ...?
+// switch ?options? string {pattern body ?pattern body ...?}
+static void tcl_command_SWITCH()
+{
+D
+ tcl_codify_cmd("keyword",0);
+ tcl_codify_cmd(NULL,1);
+ tcl_scan *myScan=NULL;
+ unsigned int i;
+ QCString token;
+ // first: find the last option token
+ unsigned int lastOptionIndex = 0;
+ for (i = 2; i<tcl.list_commandwords.count(); i += 2)
+ {
+ token = (*tcl.list_commandwords.at(i)).utf8();
+ if (token == "--")
+ {
+ lastOptionIndex = i;
+ break;
+ }
+ if (token[0] == '-' && i - lastOptionIndex == 2)
+ {
+ // options start with dash and should form a continuous chain
+ lastOptionIndex = i;
+ }
+ }
+ // second: eat up options
+ for (i = 2; i <= lastOptionIndex; i++)
+ {
+ myScan = tcl_command_ARG(myScan, i, false);
+ }
+ // third: how many tokens are left?
+ if (tcl.list_commandwords.count() - lastOptionIndex == 5)
+ {
+ //printf("syntax: switch ?options? string {pattern body ?pattern body ...?}\n");
+ myScan = tcl_command_ARG(myScan, lastOptionIndex + 1, false);
+ myScan = tcl_command_ARG(myScan, lastOptionIndex + 2, false);
+ myScan = tcl_command_ARG(myScan, lastOptionIndex + 3, false);
+ // walk trough the list step by step
+ // this way we can preserve whitespace
+ bool inBraces = false;
+ bool nextIsPattern = true;
+ int size;
+ const char *elem;
+ const char *next;
+ token = (*tcl.list_commandwords.at(lastOptionIndex + 4)).utf8();
+ if (token[0] == '{')
+ {
+ inBraces = true;
+ token = token.mid(1, token.length() - 2);
+ myScan = tcl_codify_token(myScan, "NULL", QCString("{"));
+ }
+ // ToDo: check if multibyte chars are handled correctly
+ while (token.length() > 0)
+ {
+ TclFindElement((const char*)token, token.length(), &elem, &next, &size, NULL);
+ //printf("%s\nstart=%d, elem=%d, next=%d, size=%d, brace=%d\n",
+ // (const char*) token, (const char*) token, elem, next, size, brace);
+ //
+ // handle leading whitespace/opening brace/double quotes
+ if (elem - token > 0)
{
- tcl_codify_link(myStr);
+ myScan = tcl_codify_token(myScan, "NULL", token.left(elem - token));
}
- else
+ // handle actual element without braces/double quotes
+ if (nextIsPattern)
+ {
+ myScan = tcl_codify_token(myScan, "NULL", token.mid(elem - token,size));
+ //printf("pattern=%s\n",(const char*) token.mid(elem - token, size));
+ }
+ else {
+ myScan = tcl_codify_token(myScan, "script", token.mid(elem - token, size));
+ //printf("script =%s\n", (const char*) token.mid(elem - token, size));
+ }
+ // handle trailing whitespace/closing brace/double quotes
+ if (next - elem - size > 0)
{
- tcl_codify(NULL,myStr);
+ myScan = tcl_codify_token(myScan, "NULL", token.mid(elem - token + size, next - elem - size));
}
+ nextIsPattern = !nextIsPattern;
+ token = token.mid(next - token);
+ }
+ if (inBraces)
+ {
+ myScan = tcl_codify_token(myScan, "NULL", QCString("}"));
+ }
+ if (!nextIsPattern)
+ {
+ tcl_war("Invalid switch syntax: last token is not a list of even elements.\n");
+ //tcl_war("%s\n", tcl.list_commandwords.join(" ").ascii());
}
}
- return (myScan);
+ else if ((tcl.list_commandwords.count() - lastOptionIndex > 6) &&
+ ((tcl.list_commandwords.count() - lastOptionIndex-3) % 4 == 0))
+ {
+ //printf("detected: switch ?options? string pattern body ?pattern body ...?\n");
+ myScan = tcl_command_ARG(myScan, lastOptionIndex + 1, false);
+ myScan = tcl_command_ARG(myScan, lastOptionIndex + 2, false);
+ //printf("value=%s\n",(const char*) (*tcl.list_commandwords.at(lastOptionIndex + 2)).utf8());
+ for (i = lastOptionIndex + 3; i < tcl.list_commandwords.count(); i += 4)
+ {
+ myScan = tcl_command_ARG(myScan, i + 0, false); // whitespace
+ myScan = tcl_command_ARG(myScan, i + 1, false); // pattern
+ myScan = tcl_command_ARG(myScan, i + 2, false); // whitespace
+ myScan = tcl_codify_token(myScan, "script", (*tcl.list_commandwords.at(i+3)).utf8()); // script
+ //printf("pattern=%s\n",(const char*) (*tcl.list_commandwords.at(i+1)).utf8());
+ //printf("script=%s\n",(const char*) (*tcl.list_commandwords.at(i+3)).utf8());
+ }
+ }
+ else
+ {
+ // not properly detected syntax
+ tcl_war("Invalid switch syntax: %d options followed by %d tokens.\n",
+ lastOptionIndex / 2, (tcl.list_commandwords.count() - 1) / 2 - lastOptionIndex / 2);
+ for (i = lastOptionIndex + 1; i <= tcl.list_commandwords.count(); i++)
+ {
+ myScan = tcl_command_ARG(myScan, i, false);
+ }
+ }
+}
+
+//! Handle internal tcl commands.
+// "catch script ?resultVarName? ?optionsVarName?"
+static void tcl_command_CATCH()
+{
+D
+ tcl_codify_cmd("keyword", 0);
+ tcl_codify_cmd(NULL, 1);
+ tcl_scan *myScan = tcl.scan.at(0);
+ myScan = tcl_scan_start('?', *tcl.list_commandwords.at(2),
+ myScan->ns, myScan->entry_cl, myScan->entry_fn);
+ for (unsigned int i = 3; i < tcl.list_commandwords.count(); i++)
+ {
+ myScan = tcl_command_ARG(myScan, i, false);
+ }
}
//! Handle internal tcl commands.
@@ -1937,7 +2117,7 @@ D
tcl_codify_cmd(NULL,3);
tcl_codify_cmd(NULL,4);
tcl_codify_cmd(NULL,5);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)).utf8(),myNs,myName);
+ tcl_name_SnippetAware(myScan->ns,(*tcl.list_commandwords.at(2)).utf8(),myNs,myName);
if (myNs.length())
{
myEntryNs = tcl_entry_namespace(myNs);
@@ -2195,15 +2375,62 @@ D
}
myEntryCl = tcl_entry_class(myName);
myStr = (*tcl.list_commandwords.at(4)).utf8();
- if (tcl.list_commandwords.count() > 5)
+ //
+ // special cases first
+ // oo::define classname method methodname args script
+ // oo::define classname constructor argList bodyScript
+ // oo::define classname destructor bodyScript
+ unsigned int n =tcl.list_commandwords.count();
+ if ((myStr == "method" && n == 11) ||
+ (myStr == "constructor" && n == 9) ||
+ (myStr == "destructor" && n == 7))
+ {
+ for (unsigned int i = 4; i < n-1; i++)
+ {
+ tcl_codify_cmd("NULL",i);
+ }
+ Entry *myEntry;
+ QCString myMethod;
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(n==11?6:4)).utf8(),myNs,myMethod);
+ // code snippet taken from tcl_command_METHOD()/tcl_command_CONSTRUCTOR
+ tcl.fn.remove(myMethod);
+ tcl.entry_current->section = Entry::FUNCTION_SEC;
+ tcl.entry_current->mtype = Method;
+ tcl.entry_current->name = myMethod;
+ tcl.entry_current->startLine = tcl.line_command;
+ tcl.entry_current->bodyLine = tcl.line_body0;
+ tcl.entry_current->endBodyLine = tcl.line_body1;
+ tcl_protection(tcl.entry_current);
+ if (n==11)
+ {
+ tcl_command_ARGLIST(*tcl.list_commandwords.at(8));
+ }
+ else if (n==9)
+ {
+ tcl_command_ARGLIST(*tcl.list_commandwords.at(6));
+ }
+ if (myEntryCl) myEntryCl->addSubEntry(tcl.entry_current);
+ tcl.fn.insert(myMethod,tcl.entry_current);
+ myEntry = tcl.entry_current;
+ myScan = tcl_scan_start('?',*tcl.list_commandwords.at(n-1),
+ myNs, myEntryCl, myEntry);
+ }
+ else
{
- for (uint i=5;i<tcl.list_commandwords.count();i++)
+ // The general case
+ // Simply concat all arguments into a script.
+ // Note: all documentation collected just before the
+ // oo::define command is lost
+ if (tcl.list_commandwords.count() > 5)
{
- myStr.append((*tcl.list_commandwords.at(i)).utf8());
+ for (uint i=5;i<tcl.list_commandwords.count();i++)
+ {
+ myStr.append((*tcl.list_commandwords.at(i)).utf8());
+ }
+ tcl.word_is=' ';
}
- tcl.word_is=' ';
+ myScan = tcl_scan_start(tcl.word_is,myStr,myName,myEntryCl,NULL);
}
- myScan = tcl_scan_start(tcl.word_is,myStr,myName,myEntryCl,NULL);
}
//! Handle \c variable statements.
@@ -2458,9 +2685,26 @@ tcl_inf("->\n");
}
/*
* Start of internal tcl keywords
- * Ready: if, for, foreach, while
- * TODO: switch, eval, ?
+ * Ready: switch, eval, catch, if, for, foreach, while
*/
+ if (myStr=="switch")
+ {
+ if (tcl.list_commandwords.count() < 5) {myLine=__LINE__;goto command_warn;}
+ tcl_command_SWITCH();
+ goto command_end;
+ }
+ if (myStr=="eval")
+ {
+ if (tcl.list_commandwords.count() < 3) {myLine=__LINE__;goto command_warn;}
+ tcl_command_EVAL();
+ goto command_end;
+ }
+ if (myStr=="catch")
+ {
+ if (tcl.list_commandwords.count() < 3) {myLine=__LINE__;goto command_warn;}
+ tcl_command_CATCH();
+ goto command_end;
+ }
if (myStr=="for")
{
if (tcl.list_commandwords.count() != 9) {myLine=__LINE__;goto command_warn;}
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index efddcd4..2bb5734 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -727,10 +727,26 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
if (md->isGettable()) t << "yes"; else t << "no";
t << "\"";
+ t << " privategettable=\"";
+ if (md->isPrivateGettable()) t << "yes"; else t << "no";
+ t << "\"";
+
+ t << " protectedgettable=\"";
+ if (md->isProtectedGettable()) t << "yes"; else t << "no";
+ t << "\"";
+
t << " settable=\"";
if (md->isSettable()) t << "yes"; else t << "no";
t << "\"";
+ t << " privatesettable=\"";
+ if (md->isPrivateSettable()) t << "yes"; else t << "no";
+ t << "\"";
+
+ t << " protectedsettable=\"";
+ if (md->isProtectedSettable()) t << "yes"; else t << "no";
+ t << "\"";
+
if (md->isAssign() || md->isCopy() || md->isRetain() || md->isStrong() || md->isWeak())
{
t << " accessor=\"";