Repository: groovy
Updated Branches:
  refs/heads/master c36ddc969 -> 57fe0c773


GROOVY-8861: Simplify the switch for runtime groovydoc(closes #817)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/57fe0c77
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/57fe0c77
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/57fe0c77

Branch: refs/heads/master
Commit: 57fe0c7731ffba88e4d06c5e212739941c97fda6
Parents: c36ddc9
Author: Daniel Sun <sun...@apache.org>
Authored: Sat Nov 3 00:08:28 2018 +0800
Committer: Daniel Sun <sun...@apache.org>
Committed: Sat Nov 3 00:08:28 2018 +0800

----------------------------------------------------------------------
 .../groovy/parser/antlr4/GroovydocManager.java    |  2 +-
 .../src/test/resources/core/Groovydoc_01x.groovy  | 18 ++++++------------
 2 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/57fe0c77/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovydocManager.java
----------------------------------------------------------------------
diff --git 
a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovydocManager.java
 
b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovydocManager.java
index daac5bd..c91b96f 100644
--- 
a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovydocManager.java
+++ 
b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/GroovydocManager.java
@@ -52,7 +52,7 @@ public class GroovydocManager {
     private static final String ATTACH_RUNTIME_GROOVYDOC = 
"groovy.attach.runtime.groovydoc";
     private static final boolean ATTACHING_RUNTIME_GROOVYDOC_ENABLED;
     private static final String VALUE = "value";
-    private static final String RUNTIME_GROOVYDOC_PATTERN = 
"(?s)/[*][*]\\s+(\\s+[*]\\s*)*@Groovydoc\\b.+?[*]/";
+    private static final String RUNTIME_GROOVYDOC_PATTERN = 
"(?s)/[*][*]@\\s+.*?[*]/";
 
     private static final GroovydocManager INSTANCE = new GroovydocManager();
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/57fe0c77/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy
----------------------------------------------------------------------
diff --git 
a/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy 
b/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy
index 9ed1eec..4aaa473 100644
--- a/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy
+++ b/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy
@@ -16,35 +16,30 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-/**
- * @Groovydoc
+/**@
  * class AA
  */
 class AA {
-    /**
-     * @Groovydoc
+    /**@
      * field SOME_FIELD
      */
     public static final int SOME_FIELD = 1;
 
-    /**
-     * @Groovydoc
+    /**@
      * constructor AA
      */
     public AA() {
 
     }
 
-    /**
-     * @Groovydoc
+    /**@
      * method m
      */
     public void m() {
 
     }
 
-    /**
-     * @Groovydoc
+    /**@
      * class InnerClass
      */
     class InnerClass {
@@ -54,8 +49,7 @@ class AA {
 
 }
 
-/**
- * @Groovydoc
+/**@
  * annotation BB
  */
 @interface BB {

Reply via email to