summaryrefslogtreecommitdiff
path: root/platform/lang-api/src/com/intellij/lexer/CompositeLexer.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-04 13:25:33 -0700
committerTor Norbye <tnorbye@google.com>2014-09-04 13:25:33 -0700
commitd245f58efbfc26b13b9b9d5e52e6a83a0d76216c (patch)
treebca7d49005d81d10c70bc3f547df041c636b4300 /platform/lang-api/src/com/intellij/lexer/CompositeLexer.java
parent9cde0e3c015174898df8b8f3672185941fad4786 (diff)
parentc3d3a90f6b4ead083d63e28e6b9fcea93d675678 (diff)
downloadidea-d245f58efbfc26b13b9b9d5e52e6a83a0d76216c.tar.gz
Merge remote-tracking branch 'aosp/upstream-master' into merge
Diffstat (limited to 'platform/lang-api/src/com/intellij/lexer/CompositeLexer.java')
-rw-r--r--platform/lang-api/src/com/intellij/lexer/CompositeLexer.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/platform/lang-api/src/com/intellij/lexer/CompositeLexer.java b/platform/lang-api/src/com/intellij/lexer/CompositeLexer.java
index d728aff0e823..af456e0074ac 100644
--- a/platform/lang-api/src/com/intellij/lexer/CompositeLexer.java
+++ b/platform/lang-api/src/com/intellij/lexer/CompositeLexer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,16 @@ package com.intellij.lexer;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NotNull;
+/**
+ * Naive implementation of lexer that able to combine element types of two other lexers.
+ *
+ * The implementation doesn't give any guarantees about valid points of 'incremental relexing',
+ * because it returns start/end-offsets not for token that was used but for the shortest one.
+ *
+ * Also it reduces state size to 16 bits for nested lexer.
+ *
+ * @deprecated use {@link com.intellij.psi.templateLanguages.TemplateBlackAndWhiteLexer} or {@link com.intellij.lexer.LayeredLexer} instead
+ */
public abstract class CompositeLexer extends LexerBase {
private final Lexer myLexer1;
private final Lexer myLexer2;