1 /*******************************************************************************
2 * Copyright (c) 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core.util;
13 import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
16 * Internal scanner used for DOM AST nodes.
20 public class CommentRecorderScanner extends Scanner {
22 public CommentRecorderScanner(boolean tokenizeComments,
23 boolean tokenizeWhiteSpace,
24 boolean checkNonExternalizedStringLiterals,
26 char[][] taskTags, char[][] taskPriorities) {
27 // boolean isTaskCaseSensitive) {
28 // super(tokenizeComments, tokenizeWhiteSpace,
29 // checkNonExternalizedStringLiterals,
31 // taskTags, taskPriorities, isTaskCaseSensitive);
32 super(tokenizeComments, tokenizeWhiteSpace,
33 checkNonExternalizedStringLiterals, false, false, taskTags,
34 taskPriorities, true /* taskCaseSensitive */);
38 * Set start position negative for line comments.
40 * @see net.sourceforge.phpdt.internal.compiler.parser.Scanner#recordComment(int)
42 public void recordComment(int token) {
43 super.recordComment(token);
44 if (token == TokenNameCOMMENT_LINE) {
45 // for comment line both positions are negative
46 this.commentStarts[this.commentPtr] = -this.commentStarts[this.commentPtr];