Changeset 5285


Ignore:
Timestamp:
12/30/03 19:24:02 (17 years ago)
Author:
piso
Message:

skipPreprocessor()

File:
1 edited

Legend:

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

    r434 r5285  
    33 *
    44 * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: JavaTagger.java,v 1.5 2002-12-21 15:19:43 piso Exp $
     5 * $Id: JavaTagger.java,v 1.6 2003-12-30 19:24:02 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    479479        }
    480480    }
     481
     482    // Used by the C, C++ and Objective C taggers.
     483    protected static final void skipPreprocessor(Position pos)
     484    {
     485        while (true) {
     486            Line line = pos.getLine();
     487            Line nextLine = line.next();
     488            if (nextLine == null) {
     489                pos.setOffset(line.length());
     490                return;
     491            }
     492            pos.moveTo(nextLine, 0);
     493            if (line.length() == 0 || line.charAt(line.length()-1) != '\\')
     494                return;
     495        }
     496    }
    481497}
Note: See TracChangeset for help on using the changeset viewer.