This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 package Lex;
2
3 abstract class Comment extends InputElement {
4   private StringBuffer comment = new StringBuffer();
5
6   String getComment() {
7     return comment.toString();
8   }
9
10   void appendLine(String more) { // 'more' is '\n' terminated.
11     int i=0;
12
13     // skip leading white space.
14     for (; i<more.length(); i++)
15       if (!Character.isSpaceChar(more.charAt(i)))
16         break;
17
18     // skip any leading stars.
19     for (; i<more.length(); i++)
20       if (more.charAt(i)!='*')
21         break;
22
23     // the rest of the string belongs to the comment.
24     if (i<more.length())
25       comment.append(more.substring(i));
26   }
27
28 }