--- a/Method.st Sat Jul 17 14:17:36 2010 +0200
+++ b/Method.st Sat Jul 17 14:24:14 2010 +0200
@@ -352,35 +352,19 @@
from the methods source (excluding any double-quotes).
Returns nil if there is no comment (or source is not available)."
- |src comment comments parser|
+ |src|
src := self source.
src isNil ifTrue:[^ nil].
-
- parser := Parser for:src in:nil.
- parser ignoreErrors:true; ignoreWarnings:true; saveComments:true.
- parser parseMethodSpec.
-
- comments := parser comments.
- comments size ~~ 0 ifTrue:[
- comment := comments first asString.
- (comment withoutSpaces endsWith:'}') ifTrue:[
- "if first comment is a pragma, take next comment"
- comment := comments at:2 ifAbsent:nil.
- comment notNil ifTrue:[
- comment := comment string.
- ].
- ].
- ].
- ^ comment.
+ ^ self programmingLanguage parserClass methodCommentFromSource:src
"
- (Method compiledMethodAt:#comment) comment
+ (Method compiledMethodAt:#comment) comment
(Object class compiledMethodAt:#infoPrinting:) comment
"
- "Modified: / 17.2.1998 / 14:50:00 / cg"
- "Modified: / 23.2.1998 / 10:26:08 / stefan"
+ "Modified: / 23-02-1998 / 10:26:08 / stefan"
+ "Modified: / 17-07-2010 / 14:23:56 / cg"
!
getPackage
@@ -3012,11 +2996,11 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.350 2010-05-04 15:49:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.351 2010-07-17 12:24:14 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.350 2010-05-04 15:49:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.351 2010-07-17 12:24:14 cg Exp $'
! !
Method initialize!