com.intellij.lexer.MergingLexerAdapter Java Examples
The following examples show how to use
com.intellij.lexer.MergingLexerAdapter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CSharpCfsLanguageVersion.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Nonnull @Override public Lexer createInnerLexer() { if(myExpressionElementType == null) { myExpressionElementType = createExpressionElementType(); } return new MergingLexerAdapter(new CSharpInterpolationStringLexer(myExpressionElementType), TokenSet.create(myExpressionElementType, CfsTokens.TEXT, CfsTokens.FORMAT)); }
Example #2
Source File: PlainTextSyntaxHighlighterFactory.java From consulo with Apache License 2.0 | 5 votes |
public static Lexer createPlainTextLexer() { ArrayList<TokenParser> tokenParsers = new ArrayList<TokenParser>(); tokenParsers.add(new WhitespaceParser()); tokenParsers.addAll(BraceTokenParser.getBraces()); tokenParsers.addAll(BraceTokenParser.getParens()); tokenParsers.addAll(BraceTokenParser.getBrackets()); tokenParsers.addAll(BraceTokenParser.getAngleBrackets()); return new MergingLexerAdapter(new AbstractCustomLexer(tokenParsers), TokenSet.create(CustomHighlighterTokenType.CHARACTER)); }
Example #3
Source File: HaxeLexer.java From intellij-haxe with Apache License 2.0 | 4 votes |
public HaxeLexer(Project project) { super(new MergingLexerAdapter(new HaxeFlexLexer(project), tokensToMerge)); myProject = project; }
Example #4
Source File: XQueryLexer.java From intellij-xquery with Apache License 2.0 | 4 votes |
public XQueryLexer() { super(new MergingLexerAdapter(new FlexAdapter(new _XQueryLexer()), orSet(COMMENTS, WHITE_SPACES, CHARACTER_CONTENTS))); }
Example #5
Source File: FileTemplateConfigurable.java From consulo with Apache License 2.0 | 4 votes |
@Nonnull @VisibleForTesting static Lexer createDefaultLexer() { return new MergingLexerAdapter(new FileTemplateTextLexer(), TokenSet.create(FileTemplateTokenType.TEXT)); }