mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add //= to augmented assignment operators
This commit is contained in:
@@ -144,7 +144,7 @@ public class PyTokenTypes {
|
||||
public static final TokenSet CLOSE_BRACES = TokenSet.create(RBRACKET, RBRACE, RPAR);
|
||||
|
||||
public static final TokenSet AUG_ASSIGN_OPERATIONS = TokenSet.create(PLUSEQ, MINUSEQ, MULTEQ, DIVEQ,
|
||||
PERCEQ, EXPEQ, GTGTEQ, LTLTEQ, ANDEQ, OREQ, XOREQ);
|
||||
PERCEQ, EXPEQ, GTGTEQ, LTLTEQ, ANDEQ, OREQ, XOREQ, FLOORDIVEQ);
|
||||
|
||||
public static final PyElementType BACKSLASH = new PyElementType("BACKSLASH");
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PyFileElementType extends IStubFileElementType {
|
||||
|
||||
@Override
|
||||
public int getStubVersion() {
|
||||
return 9;
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
a //= 2
|
||||
@@ -0,0 +1,9 @@
|
||||
PyFile:FloorDiv.py
|
||||
PyAugAssignmentStatement
|
||||
PyReferenceExpression: a
|
||||
PsiElement(Py:IDENTIFIER)('a')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(Py:FLOORDIVEQ)('//=')
|
||||
PsiWhiteSpace(' ')
|
||||
PyNumericLiteralExpression
|
||||
PsiElement(Py:INTEGER_LITERAL)('2')
|
||||
@@ -182,6 +182,10 @@ public class PythonParsingTest extends ParsingTestCase {
|
||||
doTest(LanguageLevel.PYTHON30);
|
||||
}
|
||||
|
||||
public void testFloorDiv() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testWithStatement31() throws Exception {
|
||||
doTest(LanguageLevel.PYTHON31);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user