Changeset 201


Ignore:
Timestamp:
11/05/02 01:26:48 (21 years ago)
Author:
piso
Message:

Use CTagger.skipPreprocessor().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/CppTagger.java

    r2 r201  
    2222
    2323import java.util.Stack;
    24 import java.util.Vector;
     24import java.util.ArrayList;
    2525
    2626public final class CppTagger extends JavaTagger implements Constants
     
    4343    public void run()
    4444    {
    45         Vector tags = new Vector();
     45        ArrayList tags = new ArrayList();
    4646        String className = null;
    4747        Stack classNames = new Stack();
     
    6464                continue;
    6565            }
    66             if (pos.lookingAt("//") || (c == '#' && pos.getOffset() == 0)) {
     66            if (pos.lookingAt("//")) {
    6767                Line nextLine = pos.getNextLine();
    6868                if (nextLine == null)
    6969                    break;
    7070                pos.moveTo(nextLine, 0);
     71                continue;
     72            }
     73            if (c == '#' && pos.getOffset() == 0) {
     74                CTagger.skipPreprocessor(pos);
    7175                continue;
    7276            }
     
    192196        }
    193197        // Token can't end with ':'.
    194         while (sb.length() > 0 && sb.charAt(sb.length() - 1) == ':')
    195             sb.setLength(sb.length() - 1);
     198        while (sb.length() > 0 && sb.charAt(sb.length()-1) == ':')
     199            sb.setLength(sb.length()-1);
    196200        token = sb.toString();
    197201    }
Note: See TracChangeset for help on using the changeset viewer.