highlighting tests; fix try/finally parsing; drop old try/finally PSI; fix "continue in finally" highlighting

This commit is contained in:
Dmitry Jemerov
2008-02-02 23:51:48 +03:00
parent e181e0e466
commit 326e677837
5 changed files with 28 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@
<orderEntry type="module" module-name="lang-api" />
<orderEntry type="module" module-name="ExtendedApi" />
<orderEntry type="library" name="JUnit3" level="project" />
<orderEntry type="module" module-name="codeInsight-tests" />
<orderEntryProperties />
</component>
</module>
@@ -0,0 +1,5 @@
while True:
try:
x
finally:
<error descr="'continue' not supported inside 'finally' clause">continue</error>
@@ -0,0 +1 @@
<error descr="'return' outside of function">return 1</error>
+4
View File
@@ -0,0 +1,4 @@
try:
x
finally:
z
+17
View File
@@ -0,0 +1,17 @@
PyFile:TryFinally.py
PyTryExceptStatement
PsiElement(Py:TRY_KEYWORD)('try')
PsiElement(Py:COLON)(':')
PsiWhiteSpace('\n ')
PyStatementList
PyExpressionStatement
PyReferenceExpression: x
PsiElement(Py:IDENTIFIER)('x')
PsiWhiteSpace('\n')
PsiElement(Py:FINALLY_KEYWORD)('finally')
PsiElement(Py:COLON)(':')
PsiWhiteSpace('\n ')
PyStatementList
PyExpressionStatement
PyReferenceExpression: z
PsiElement(Py:IDENTIFIER)('z')