[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-cvs
Subject:    [ jEdit-commits ] SF.net SVN: jedit:[19515]
From:       daleanson () users ! sourceforge ! net
Date:       2011-04-20 17:59:59
Message-ID: E1QCbh1-0006GZ-Gs () sfp-svn-6 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 19515
          http://jedit.svn.sourceforge.net/jedit/?rev=19515&view=rev
Author:   daleanson
Date:     2011-04-20 17:59:59 +0000 (Wed, 20 Apr 2011)

Log Message:
-----------
A couple of bug fixes --
- fixed space being removed between 'import' and package name.
- fixed extra blank lines being inserted after 'return' statement.

Modified Paths:
--------------
    plugins/Beauty/trunk/src/beauty/parsers/bsh/BSHParser.java
    plugins/Beauty/trunk/src/beauty/parsers/bsh/bsh.jj

Modified: plugins/Beauty/trunk/src/beauty/parsers/bsh/BSHParser.java
===================================================================
--- plugins/Beauty/trunk/src/beauty/parsers/bsh/BSHParser.java	2011-04-20 17:23:10 \
                UTC (rev 19514)
+++ plugins/Beauty/trunk/src/beauty/parsers/bsh/BSHParser.java	2011-04-20 17:59:59 \
UTC (rev 19515) @@ -384,10 +384,10 @@
 
   final public void PackageDeclaration() throws ParseException {
     jj_consume_token(PACKAGE);
-                add("package");
+                add("package ");
     AmbiguousName();
     jj_consume_token(SEMICOLON);
-                                                        add(";"); write();
+                                                         add(";"); write();
   }
 
   final public void ImportDeclaration() throws ParseException {
@@ -720,7 +720,7 @@
 
   final public void AmbiguousName() throws ParseException {
     t = jj_consume_token(IDENTIFIER);
-                     trimWhitespace(); add(t);
+                     add(t);
     label_5:
     while (true) {
       if (jj_2_8(2)) {
@@ -1586,7 +1586,7 @@
       add("{"); write();
         Expression();
         jj_consume_token(RBRACE);
-                                              write(); add("}"); write();
+                                              trimWhitespace(); write(); add("}"); \
write();  
         break;
       default:
@@ -2479,7 +2479,7 @@
 
   final public void ReturnStatement() throws ParseException {
     jj_consume_token(RETURN);
-             add("return");
+             add("return ");
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case BOOLEAN:
     case BYTE:
@@ -2513,7 +2513,7 @@
       ;
     }
     jj_consume_token(SEMICOLON);
-                                                     add(";"); writeln();
+                                                      add(";"); write();
   }
 
   final public void SynchronizedStatement() throws ParseException {
@@ -2921,6 +2921,11 @@
     return false;
   }
 
+  private boolean jj_3R_229() {
+    if (jj_3R_51()) return true;
+    return false;
+  }
+
   private boolean jj_3R_151() {
     if (jj_scan_token(TRY)) return true;
     if (jj_3R_50()) return true;
@@ -2934,11 +2939,6 @@
     return false;
   }
 
-  private boolean jj_3R_229() {
-    if (jj_3R_51()) return true;
-    return false;
-  }
-
   private boolean jj_3R_228() {
     if (jj_scan_token(IDENTIFIER)) return true;
     return false;

Modified: plugins/Beauty/trunk/src/beauty/parsers/bsh/bsh.jj
===================================================================
--- plugins/Beauty/trunk/src/beauty/parsers/bsh/bsh.jj	2011-04-20 17:23:10 UTC (rev \
                19514)
+++ plugins/Beauty/trunk/src/beauty/parsers/bsh/bsh.jj	2011-04-20 17:59:59 UTC (rev \
19515) @@ -632,7 +632,7 @@
 void PackageDeclaration () :
 { }
 {
-    "package" { add("package"); } AmbiguousName() ";" { add(";"); write(); }
+    "package" { add("package "); } AmbiguousName() ";" { add(";"); write(); }
 }
 
 void ImportDeclaration()  :
@@ -743,7 +743,7 @@
 {
 }
 {
-    t=<IDENTIFIER> { trimWhitespace(); add(t); }
+    t=<IDENTIFIER> { add(t); }
   ( LOOKAHEAD(2) "." t=<IDENTIFIER> { add("."); add(t); } )* 
 }
 
@@ -1016,7 +1016,7 @@
     "." { add("."); } t=<IDENTIFIER> { add(t); } [ Arguments() ] {
     }
 |
-"{" { add("{"); write(); } Expression() "}" { write(); add("}"); write(); } {
+"{" { add("{"); write(); } Expression() "}" { trimWhitespace(); write(); add("}"); \
write(); } {  }
 /*
     For inner classes
@@ -1461,7 +1461,7 @@
 void ReturnStatement()  :
 {}
 {
-  "return" { add("return"); } [ Expression() ] ";" { add(";"); writeln(); }
+  "return" { add("return "); } [ Expression() ] ";" { add(";"); write(); }
 }
 
 void SynchronizedStatement()  :


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic