View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.cpd;
5   
6   import java.util.ArrayList;
7   
8   /**
9    * Implements a tokenizer for the Go Language.
10   *
11   * @author oinume@gmail.com
12   */
13  public class GoTokenizer extends AbstractTokenizer {
14  
15      /**
16       * Creates a new {@link GoTokenizer}
17       */
18      public GoTokenizer() {
19          // setting markers for "string" in Go
20          this.stringToken = new ArrayList<String>();
21          this.stringToken.add("\"");
22          this.stringToken.add("`");
23  
24          // setting markers for 'ignorable character' in Go
25          this.ignorableCharacter = new ArrayList<String>();
26          this.ignorableCharacter.add(";");
27  
28          // setting markers for 'ignorable string' in Go
29          this.ignorableStmt = new ArrayList<String>();
30      }
31  }