diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-20 16:18:30 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-20 16:18:30 (GMT) |
commit | 41f93881ad51d21aece16d8c1c272c0ff3246db8 (patch) | |
tree | 3b8495d19f947cc6792c26251e51df1091d1a438 /tools | |
parent | 2d2ac3395663bb3b5335073b4120cc909194edfb (diff) | |
download | Qt-41f93881ad51d21aece16d8c1c272c0ff3246db8.zip Qt-41f93881ad51d21aece16d8c1c272c0ff3246db8.tar.gz Qt-41f93881ad51d21aece16d8c1c272c0ff3246db8.tar.bz2 |
Added a \js command for JavaScript code.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/doc.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 774f8ba..140545a 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -96,6 +96,7 @@ enum { #ifdef QDOC_QML CMD_QML, CMD_ENDQML, CMD_CPP, CMD_ENDCPP, CMD_QMLTEXT, CMD_ENDQMLTEXT, CMD_CPPTEXT, CMD_ENDCPPTEXT, + CMD_JS, CMD_ENDJS, #endif NOT_A_CMD }; @@ -202,6 +203,8 @@ static struct { { "endqmltext", CMD_ENDQMLTEXT, 0 }, { "cpptext", CMD_CPPTEXT, 0 }, { "endcpptext", CMD_ENDCPPTEXT, 0 }, + { "js", CMD_JS, 0 }, + { "endjs", CMD_ENDJS, 0 }, #endif { 0, 0, 0 } }; @@ -557,6 +560,10 @@ void DocParser::parse(const QString& source, case CMD_QMLTEXT: append(Atom::QmlText); break; + case CMD_JS: + leavePara(); + append(Atom::JavaScript, getCode(CMD_JS, CodeMarker::markerForLanguage(QLatin1String("JavaScript")))); + break; #endif case CMD_DIV: leavePara(); @@ -644,6 +651,9 @@ void DocParser::parse(const QString& source, case CMD_ENDQMLTEXT: append(Atom::EndQmlText); break; + case CMD_ENDJS: + closeCommand(cmd); + break; #endif case CMD_ENDFOOTNOTE: if (closeCommand(cmd)) { @@ -2406,6 +2416,8 @@ int DocParser::endCmdFor(int cmd) return CMD_ENDQML; case CMD_QMLTEXT: return CMD_ENDQMLTEXT; + case CMD_JS: + return CMD_ENDJS; #endif case CMD_FOOTNOTE: return CMD_ENDFOOTNOTE; |