mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
Now it more follows original python grammar. GitOrigin-RevId: 199f30b819c85a4eba5cab9b3f67fbf1bb7f18b6
222 lines
7.3 KiB
Plaintext
222 lines
7.3 KiB
Plaintext
PyFile:InvalidAssignmentExpressions.py
|
|
PsiComment(Py:END_OF_LINE_COMMENT)('# Parenthesis everywhere because')
|
|
PsiWhiteSpace('\n')
|
|
PsiComment(Py:END_OF_LINE_COMMENT)('# unparenthesized assignment expressions are prohibited')
|
|
PsiWhiteSpace('\n')
|
|
PsiComment(Py:END_OF_LINE_COMMENT)('# at the top level of an expression statement')
|
|
PsiWhiteSpace('\n\n')
|
|
PyExpressionStatement
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyAssignmentExpression
|
|
PyTargetExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: y
|
|
PsiElement(Py:IDENTIFIER)('y')
|
|
PsiWhiteSpace(' ')
|
|
PsiErrorElement:Unexpected expression syntax
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IDENTIFIER)('z')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:INTEGER_LITERAL)('0')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace('\n\n')
|
|
PyExpressionStatement
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyAssignmentExpression
|
|
PySubscriptionExpression
|
|
PyReferenceExpression: a
|
|
PsiElement(Py:IDENTIFIER)('a')
|
|
PsiElement(Py:LBRACKET)('[')
|
|
PyReferenceExpression: i
|
|
PsiElement(Py:IDENTIFIER)('i')
|
|
PsiElement(Py:RBRACKET)(']')
|
|
PsiErrorElement:Identifier expected
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace('\n')
|
|
PyExpressionStatement
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyAssignmentExpression
|
|
PyReferenceExpression: rest
|
|
PyReferenceExpression: self
|
|
PsiElement(Py:IDENTIFIER)('self')
|
|
PsiElement(Py:DOT)('.')
|
|
PsiElement(Py:IDENTIFIER)('rest')
|
|
PsiErrorElement:Identifier expected
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PyListLiteralExpression
|
|
PsiElement(Py:LBRACKET)('[')
|
|
PsiElement(Py:RBRACKET)(']')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace('\n\n')
|
|
PyExpressionStatement
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyReferenceExpression: p
|
|
PsiElement(Py:IDENTIFIER)('p')
|
|
PsiErrorElement:Unexpected expression syntax
|
|
PsiElement(Py:COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IDENTIFIER)('Optional')
|
|
PsiElement(Py:LBRACKET)('[')
|
|
PsiElement(Py:IDENTIFIER)('int')
|
|
PsiElement(Py:RBRACKET)(']')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:NONE_KEYWORD)('None')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace('\n\n')
|
|
PyExpressionStatement
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyAssignmentExpression
|
|
PyTargetExpression: b
|
|
PsiElement(Py:IDENTIFIER)('b')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PyPrefixExpression
|
|
PsiElement(Py:MINUS)('-')
|
|
PsiErrorElement:Expression expected
|
|
<empty list>
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace('\n')
|
|
PyExpressionStatement
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyAssignmentExpression
|
|
PyTargetExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiErrorElement:Expression expected
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace('\n\n')
|
|
PyAssignmentStatement
|
|
PyTargetExpression: x
|
|
PsiElement(Py:IDENTIFIER)('x')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:EQ)('=')
|
|
PsiWhiteSpace(' ')
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyAssignmentExpression
|
|
PySubscriptionExpression
|
|
PyReferenceExpression: b
|
|
PsiElement(Py:IDENTIFIER)('b')
|
|
PsiElement(Py:LBRACKET)('[')
|
|
PyReferenceExpression: j
|
|
PsiElement(Py:IDENTIFIER)('j')
|
|
PsiElement(Py:RBRACKET)(']')
|
|
PsiErrorElement:Identifier expected
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PyReferenceExpression: z
|
|
PsiElement(Py:IDENTIFIER)('z')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:EQ)('=')
|
|
PsiWhiteSpace(' ')
|
|
PyStringLiteralExpression: spam
|
|
PsiElement(Py:SINGLE_QUOTED_STRING)(''spam'')
|
|
PsiWhiteSpace(' ')
|
|
PsiComment(Py:END_OF_LINE_COMMENT)('# z is a reference')
|
|
PsiWhiteSpace('\n\n')
|
|
PyAssignmentExpression
|
|
PyListCompExpression
|
|
PsiElement(Py:LBRACKET)('[')
|
|
PyReferenceExpression: x1
|
|
PsiElement(Py:IDENTIFIER)('x1')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:FOR_KEYWORD)('for')
|
|
PsiWhiteSpace(' ')
|
|
PyTargetExpression: x1
|
|
PsiElement(Py:IDENTIFIER)('x1')
|
|
PsiErrorElement:'in' expected
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PyBinaryExpression
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('2')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IN_KEYWORD)('in')
|
|
PsiWhiteSpace(' ')
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyTupleExpression
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('1')
|
|
PsiElement(Py:COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('2')
|
|
PsiElement(Py:COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('3')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiElement(Py:RBRACKET)(']')
|
|
PsiErrorElement:Statement expected, found Py:LBRACKET
|
|
<empty list>
|
|
PsiWhiteSpace('\n')
|
|
PyExpressionStatement
|
|
PyListCompExpression
|
|
PsiElement(Py:LBRACKET)('[')
|
|
PyReferenceExpression: x1
|
|
PsiElement(Py:IDENTIFIER)('x1')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:FOR_KEYWORD)('for')
|
|
PsiWhiteSpace(' ')
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyAssignmentExpression
|
|
PyTargetExpression: x1
|
|
PsiElement(Py:IDENTIFIER)('x1')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:COLONEQ)(':=')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('2')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(Py:IN_KEYWORD)('in')
|
|
PsiWhiteSpace(' ')
|
|
PyParenthesizedExpression
|
|
PsiElement(Py:LPAR)('(')
|
|
PyTupleExpression
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('1')
|
|
PsiElement(Py:COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('2')
|
|
PsiElement(Py:COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
PyNumericLiteralExpression
|
|
PsiElement(Py:INTEGER_LITERAL)('3')
|
|
PsiElement(Py:RPAR)(')')
|
|
PsiElement(Py:RBRACKET)(']') |