1 2 package org.netbeans.modules.lexer.demo.handcoded.plain; 3 4 import org.netbeans.api.lexer.Lexer; 5 import org.netbeans.api.lexer.TokenId; 6 import org.netbeans.spi.lexer.AbstractLanguage; 7 8 public class PlainLanguage extends AbstractLanguage { 9 10 11 private static PlainLanguage INSTANCE; 12 13 14 public static synchronized PlainLanguage get() { 15 if (INSTANCE == null) 16 INSTANCE = new PlainLanguage(); 17 18 return INSTANCE; 19 } 20 21 public static final int TEXT_INT = 1; 22 23 24 public static final TokenId TEXT = new TokenId("text", TEXT_INT); 26 PlainLanguage() { 27 } 28 29 public Lexer createLexer() { 30 return new PlainLexer(); 31 } 32 33 } 34 | Popular Tags |