mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
PY-76877 Conformance test failure: overloads_basic.py
PySliceExpression is replaced by PySubscriptionExpression in AST. PySliceItem is returned by PySubscriptionExpression.getIndexExpression(). For that purpose PySliceItem is now a PyExpression of type `builtins.slice`. GitOrigin-RevId: 9aa8de13ef7c51741e248317c5264b3a06ffb9bf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6eb1b97d67
commit
c8fb196d52
@@ -73,7 +73,6 @@ public interface PyElementTypes {
|
||||
PyElementType BOOL_LITERAL_EXPRESSION = new PyElementType("BOOL_LITERAL_EXPRESSION", Companion.getINSTANCE().getBoolLiteralExpressionConstructor());
|
||||
PyElementType PARENTHESIZED_EXPRESSION = new PyElementType("PARENTHESIZED_EXPRESSION", Companion.getINSTANCE().getParenthesizedExpressionConstructor());
|
||||
PyElementType SUBSCRIPTION_EXPRESSION = new PyElementType("SUBSCRIPTION_EXPRESSION", Companion.getINSTANCE().getSubscriptionExpressionConstructor());
|
||||
PyElementType SLICE_EXPRESSION = new PyElementType("SLICE_EXPRESSION", Companion.getINSTANCE().getSliceExpressionConstructor());
|
||||
PyElementType SLICE_ITEM = new PyElementType("SLICE_ITEM", Companion.getINSTANCE().getSliceItemConstructor());
|
||||
PyElementType BINARY_EXPRESSION = new PyElementType("BINARY_EXPRESSION", Companion.getINSTANCE().getBinaryExpressionConstructor());
|
||||
PyElementType PREFIX_EXPRESSION = new PyElementType("PREFIX_EXPRESSION", Companion.getINSTANCE().getPrefixExpressionConstructor());
|
||||
|
||||
@@ -71,7 +71,6 @@ abstract class PyElementTypesFacade {
|
||||
abstract val parenthesizedExpressionConstructor: Function<in ASTNode, out PsiElement>
|
||||
abstract val subscriptionExpressionConstructor: Function<in ASTNode, out PsiElement>
|
||||
|
||||
abstract val sliceExpressionConstructor: Function<in ASTNode, out PsiElement>
|
||||
abstract val sliceItemConstructor: Function<in ASTNode, out PsiElement>
|
||||
abstract val binaryExpressionConstructor: Function<in ASTNode, out PsiElement>
|
||||
abstract val prefixExpressionConstructor: Function<in ASTNode, out PsiElement>
|
||||
|
||||
@@ -36,7 +36,7 @@ public final class PythonTokenSetContributor extends PythonDialectsTokenSetContr
|
||||
public @NotNull TokenSet getExpressionTokens() {
|
||||
return TokenSet.create(EMPTY_EXPRESSION, REFERENCE_EXPRESSION, INTEGER_LITERAL_EXPRESSION, FLOAT_LITERAL_EXPRESSION,
|
||||
IMAGINARY_LITERAL_EXPRESSION, STRING_LITERAL_EXPRESSION, PARENTHESIZED_EXPRESSION,
|
||||
SUBSCRIPTION_EXPRESSION, SLICE_EXPRESSION, BINARY_EXPRESSION, PREFIX_EXPRESSION, CALL_EXPRESSION,
|
||||
SUBSCRIPTION_EXPRESSION, SLICE_ITEM, BINARY_EXPRESSION, PREFIX_EXPRESSION, CALL_EXPRESSION,
|
||||
LIST_LITERAL_EXPRESSION, TUPLE_EXPRESSION, KEYWORD_ARGUMENT_EXPRESSION, STAR_ARGUMENT_EXPRESSION,
|
||||
LAMBDA_EXPRESSION, LIST_COMP_EXPRESSION, DICT_LITERAL_EXPRESSION, KEY_VALUE_EXPRESSION,
|
||||
REPR_EXPRESSION, GENERATOR_EXPRESSION, CONDITIONAL_EXPRESSION, YIELD_EXPRESSION,
|
||||
|
||||
@@ -601,7 +601,7 @@ public class ExpressionParsing extends Parsing {
|
||||
sliceMarker.done(PyElementTypes.EMPTY_EXPRESSION);
|
||||
sliceItemStart.done(PyElementTypes.SLICE_ITEM);
|
||||
nextToken();
|
||||
exprStart.done(PyElementTypes.SLICE_EXPRESSION);
|
||||
exprStart.done(PyElementTypes.SUBSCRIPTION_EXPRESSION);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -653,7 +653,7 @@ public class ExpressionParsing extends Parsing {
|
||||
if (sliceOrTupleStart != null) {
|
||||
sliceOrTupleStart.drop();
|
||||
}
|
||||
exprStart.done(PyElementTypes.SLICE_EXPRESSION);
|
||||
exprStart.done(PyElementTypes.SUBSCRIPTION_EXPRESSION);
|
||||
}
|
||||
return inSlice;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user