Jade multiple PSI trees custom parsing for chunks + misc

This commit is contained in:
kirill.safonov
2012-08-20 17:59:35 +04:00
parent 541c76280d
commit 346d2657c7
@@ -666,6 +666,14 @@ public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder, AS
@Override
public IElementType getTokenType() {
final IElementType elementType = doGetTokenType();
if (elementType instanceof TokenWrapper) {
return ((TokenWrapper)elementType).getDelegate();
}
return elementType;
}
private IElementType doGetTokenType() {
if (eof()) return null;
if (myRemapper != null) {
@@ -761,7 +769,7 @@ public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder, AS
@Nullable
public String getTokenText() {
if (eof()) return null;
final IElementType type = getTokenType();
final IElementType type = doGetTokenType();
if (type instanceof TokenWrapper) {
return ((TokenWrapper)type).getValue();
}