Commit Graph
167 Commits
Author SHA1 Message Date
Andrey Vlasovskikh e7db2ff39c Parsing of '@' and '@=' operators (PY-15390)
We have to introduce a new lexeme '@=' and re-define '@' to become a
binary operator as well as the prefix of the decorator.
2015-03-24 17:40:42 +03:00
Mikhail Golubev 186f1fe5af PY-14408 PythonIndentingProcessor includes tabs inside PsiWhitespace elements
Also I partially reverted previous fix in PyBlock#isWhitespaceLineBreaks,
because current approach is more general and that workaround is no longer
needed (multiple whitespaces are collapsed into single element as in other
languages).
2015-01-28 13:11:03 +03:00
Andrey Vlasovskikh ae1e6ca3e7 Better error recovery for lines with single 'class' or 'def' keywords and normal functions defined below 2014-02-26 19:29:15 +04:00
Andrey Vlasovskikh a39c3b7998 Better error recovery for blocks with missing ':' and non-empty bodies 2014-02-26 18:18:15 +04:00
Andrey Vlasovskikh 09bd5b323a Fixed error recovery after empty blocks with no indent 2014-02-26 16:26:12 +04:00
Ilya.Kazakevich 2f65c96783 Python function parsing fixed: any function has statement list now 2014-02-06 19:41:01 +04:00
Ekaterina Tuzova 4e914225b4 fixed PY-11340 Invalid case for can't assign to literal inspection 2014-01-23 17:53:05 +04:00
Ekaterina Tuzova 18db741b06 fixed PY-11476 No error given for mismatched accolade and squarebracket 2013-11-25 19:39:35 +04:00
Dmitry Jemerov c6bc240104 correctly attach leading comment to statement list (PY-1909) 2013-11-12 16:12:10 +01:00
Dmitry Jemerov aa885ea720 report missing identifier after 'as' (PY-9853) 2013-11-06 19:17:42 +01:00
Dmitry Jemerov 52efcb58c5 only allow single expression after 'in'; tweak error recovery when waiting for colon (PY-9561) 2013-11-06 19:17:41 +01:00
Dmitry Jemerov 664ee85163 improve parser recovery if keyword is used as function or class name (PY-8319) 2013-11-05 19:37:49 +01:00
Dmitry Jemerov 5d6bac5b12 improve parser recovery if keyword is used as named parameter (PY-8318) 2013-11-05 19:37:49 +01:00
Dmitry Jemerov f52709b867 tweak decorator parsing so that following line comment is outside the text range of PyDecorator (PY-5912) 2013-11-05 19:37:47 +01:00
Dmitry Jemerov 56b50d1dff report parsing error if no expression was found after * (PY-10177 part 1) 2013-10-31 21:00:19 +01:00
Ekaterina Tuzova ec5f16c8e0 fixed PY-11058 False positive Statement expected, found statement break 2013-10-11 17:05:05 +04:00
Ekaterina Tuzova 0792f733cc updated test data for parsing 2013-02-22 12:22:38 +04:00
Ekaterina Tuzova 60d0628886 fixed PY-8948 Not closed quote in subscription breaks parsing for the whole file 2013-02-21 18:44:46 +04:00
Andrey Vlasovskikh 377662303c Fixed parsing ellipsis as an expression in Python 3 (PY-8257)
In Python 3 ellipsis can appear anywhere, not only in sequence slicings. The parser
now always passes ellipsis, it's incorrect use is detected at the unsupported features
annotator or compatibility inspection levels.
2013-02-18 16:08:33 +04:00
Dmitry Jemerov 38ed156b15 report missing expression in subscription (PY-8652) 2013-01-30 18:52:59 +01:00
Andrey Vlasovskikh 8e4270e44a Fixed parsing ellipsis in slice lists (PY-8606) 2013-01-28 20:49:48 +04:00
Dmitry Jemerov f51943380f parse ellipsis only in the context where it can actually be used (PY-7763) 2012-12-13 22:03:08 +01:00
Dmitry Jemerov 59d5c27308 don't parse compound statements after semicolon at top level of file (PY-7660) 2012-12-13 22:03:07 +01:00
Andrey Vlasovskikh 1d3a7823d3 Fixed parsing error in StatementParsing.parseSimpleStatement (EA-30244) 2012-09-03 19:39:05 +04:00
Dmitry Jemerov 59bd0dd4d5 fix parsing of generator in argument list to actually match Python grammaer (PY-6926) 2012-08-07 12:46:11 +02:00
Andrey Vlasovskikh 55803b0c21 Fixed false negative in parsing for empty 'if' in list comprehensions (PY-6781) 2012-06-15 20:43:26 +04:00
Andrey Vlasovskikh 776196487a Fixed false negative in parsing incomplete 'raise ... from' expression (PY-6734) 2012-06-14 15:58:36 +04:00
Andrey Vlasovskikh c28200769a Fixed false negative in parsing incomplete 'yield from' expression (PY-6733) 2012-06-14 15:32:24 +04:00
Andrey Vlasovskikh b9939f1601 Support 'yield from' syntax (PY-6702) 2012-06-05 15:41:35 +04:00
Andrey Vlasovskikh c2db96a4f0 Better syntax error recovery for unmatched braces (PY-3067) 2012-05-31 17:07:53 +04:00
Dmitry Jemerov 95350dbe11 a reference in a slice expression in the LHS of an assignment is always a reference expression, not a target expression (PY-6468) 2012-05-04 18:32:18 +02:00
Ekaterina Tuzova 81a21bea69 fixed test data 2011-12-15 14:01:33 +04:00
Ekaterina Tuzova a89dd1b950 Merge remote branch 'origin/master'
Conflicts:
	python/testData/psi/ColonBeforeEof.txt
2011-12-15 13:10:44 +04:00
Dmitry Trofimov 035ec1f140 Fixed tests. 2011-12-14 22:04:28 +01:00
Ekaterina Tuzova 3741753179 added last statement break to the python lexing 2011-12-14 14:03:19 +04:00
Dmitry Jemerov 805e6b5481 trailing comma after star parameter is a syntax error (PY-4039) 2011-11-25 19:45:00 +01:00
Dmitry Jemerov 43df68cef6 call in qualifier of assignment LHS should be parsed as reference expression, not target expression (PY-5062) 2011-11-21 18:41:39 +01:00
Dmitry Jemerov b670fc8c7f include empty statement list in PSI if colon is missing (EA-31846 - RE: PyBaseElementImpl.childToPsiNotNull) 2011-11-21 18:41:38 +01:00
Dmitry Jemerov 87fb922bf1 tweak parsing of incomplete statements (PY-3792) 2011-11-17 10:08:35 +01:00
Dmitry Jemerov c5142c94b0 tweak lambda parsing: don't put colon inside parameter list (for consistency with regular functions) 2011-08-26 18:56:42 +02:00
Dmitry Jemerov 2adb07f362 correctly parse tuple as dictionary key (PY-4144) 2011-07-11 16:11:27 +02:00
Ekaterina Tuzova ef175a3436 separated token types for single/double and triple quoted strings
added lexer-level bytes/unicode detection
added lexer-level docstring detection
2011-07-10 17:59:57 +04:00
Dmitry Jemerov 17178af318 tweak Python parser to handle incomplete code better (PY-4053) 2011-07-01 16:16:53 +02:00
Dmitry Jemerov eaffdced8e better parser error recovery for keyword as default argument value (PY-3713) 2011-06-28 21:26:20 +02:00
Dmitry Jemerov dba64fbcea a trailing comma in argument list is not an error (PY-4016) 2011-06-28 21:26:18 +02:00
Dmitry Jemerov 8a97673aeb better recovery for syntax errors in parameter list (PY-3635); fix old bug with tuple parameters parsing 2011-05-24 17:13:23 +04:00
Dmitry Jemerov c2fdba4021 complain about missing default value of a function argument (PY-3253) 2011-04-02 20:01:51 +02:00
Dmitry Jemerov 31491c42a2 change PSI for nested comprehensions (PY-3030) 2011-03-23 20:29:15 +01:00
Dmitry Jemerov db5297d5e1 change parsing of generator in argument list so that parentheses are part of argument list, not generator (PY-3172) 2011-03-23 20:28:13 +01:00
Dmitry Jemerov e500402006 report colon with no following statement list as error (PY-2790) 2011-02-22 16:05:27 +01:00