summaryrefslogtreecommitdiff
path: root/Tools/Source/MigrationTools
diff options
context:
space:
mode:
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-24 03:02:29 +0000
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-24 03:02:29 +0000
commit8a5cdc3fa6ffaf41d4c970ec988bed4dadcf55d4 (patch)
tree0a3d885a8d4b79cf0c7acfdfc0c4f9384cc39ab3 /Tools/Source/MigrationTools
parent821709bd1b37f1a61fe5c998530083665eb2c854 (diff)
downloadedk2-8a5cdc3fa6ffaf41d4c970ec988bed4dadcf55d4.zip
edk2-8a5cdc3fa6ffaf41d4c970ec988bed4dadcf55d4.tar.gz
edk2-8a5cdc3fa6ffaf41d4c970ec988bed4dadcf55d4.tar.bz2
modify critic
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1375 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Source/MigrationTools')
-rw-r--r--Tools/Source/MigrationTools/org/tianocore/migration/Critic.java82
1 files changed, 43 insertions, 39 deletions
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/Critic.java b/Tools/Source/MigrationTools/org/tianocore/migration/Critic.java
index c737c31..881d3aa 100644
--- a/Tools/Source/MigrationTools/org/tianocore/migration/Critic.java
+++ b/Tools/Source/MigrationTools/org/tianocore/migration/Critic.java
@@ -54,45 +54,49 @@ public final class Critic {
} else if (line.matches("\\*\\*\\/")) {
incomment = false;
templine.append(line + "\n");
- } else if (incomment && line.contains("Routine Description:")) {
- description = true;
- arguments = false;
- returns = false;
- } else if (incomment && line.contains("Arguments:")) {
- description = false;
- arguments = true;
- returns = false;
- } else if (incomment && line.contains("Returns:")) {
- description = false;
- arguments = false;
- returns = true;
- } else if (incomment && description) {
- templine.append(" " + line.trim() + "\n");
- } else if (incomment && arguments) {
- mtrcommentequation = ptncommentequation.matcher(line);
- if (mtrcommentequation.find()) {
- inequation = true;
- templine.append(" @param " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
- } else if (inequation && line.trim().length() == 0) {
- inequation = false;
- templine.append(line + "\n");
- } else if (inequation && line.trim().length() != 0) {
- templine.append("#%#%" + line + "\n");
- } else {
- templine.append(" " + line.trim() + "\n");
- }
- } else if (incomment && returns) {
- mtrcommentequation = ptncommentequation.matcher(line);
- if (mtrcommentequation.find()) {
- inequation = true;
- templine.append(" @retval " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
- } else if (inequation && line.trim().length() == 0) {
- inequation = false;
- templine.append(line + "\n");
- } else if (inequation && line.trim().length() != 0) {
- templine.append("#%#%" + line + "\n");
- } else {
- templine.append(" " + line.trim() + "\n");
+ } else if (incomment) {
+ if (line.contains("Routine Description:")) {
+ description = true;
+ arguments = false;
+ returns = false;
+ } else if (line.contains("Arguments:")) {
+ description = false;
+ arguments = true;
+ returns = false;
+ } else if (line.contains("Returns:")) {
+ description = false;
+ arguments = false;
+ returns = true;
+ } else if (description) {
+ if (line.trim().length() != 0) {
+ templine.append(" " + line.trim() + "\n");
+ }
+ } else if (arguments) {
+ mtrcommentequation = ptncommentequation.matcher(line);
+ if (mtrcommentequation.find()) {
+ inequation = true;
+ templine.append(" @param " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
+ } else if (inequation && line.trim().length() == 0) {
+ inequation = false;
+ templine.append(line + "\n");
+ } else if (inequation && line.trim().length() != 0) {
+ templine.append("#%#%" + line + "\n");
+ } else {
+ templine.append(" " + line.trim() + "\n");
+ }
+ } else if (returns) {
+ mtrcommentequation = ptncommentequation.matcher(line);
+ if (mtrcommentequation.find()) {
+ inequation = true;
+ templine.append(" @retval " + mtrcommentequation.group(1) + " " + mtrcommentequation.group(2) + "\n");
+ } else if (inequation && line.trim().length() == 0) {
+ inequation = false;
+ templine.append(line + "\n");
+ } else if (inequation && line.trim().length() != 0) {
+ templine.append("#%#%" + line + "\n");
+ } else {
+ templine.append(" " + line.trim() + "\n");
+ }
}
} else {
templine.append(line + "\n");