Martin Svensson
9f6dc70d58
[Parser] Handle REPL raw multi-line string literal input
...
Extend handling of incomplete multi-line string literals during input in
REPL to also cover raw multi-line strings.
Fixes #52840 and apple/llvm-project#4628
2023-02-02 13:23:28 +09:00
Argyrios Kyrtzidis
1f117b4848
[parser] Make sure the isInputIncomplete() function works as expected for multi-line strings
2018-08-09 17:30:49 -07:00
Argyrios Kyrtzidis
82be1a5d47
[parser] Make sure the isInputIncomplete() function works as expected when there is an empty string interpolation segment
...
Previously it was erroneously treating such invalid interpolation segment as 'incomplete',
even though additional user input, will not 'complete' it.
rdar://28498239
2018-08-09 17:03:44 -07:00
Dmitri Hrybenko
caabe782e4
Parser: when recovering from an incomplete 'for' statement, don't set the
...
source location of synthesized AST nodes to point to EOF. This causes the
source range to span more tokens than the parent node does.
rdar://17630645
Swift SVN r21282
2014-08-19 15:56:52 +00:00
Ted Kremenek
fad874708e
Adjust test cases.
...
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Argyrios Kyrtzidis
286927effa
[Parser] Fix source range for an incomplete function that has no open paren.
...
Swift SVN r15182
2014-03-18 05:31:28 +00:00
Dmitri Hrybenko
c5f0a44c60
Parser: don't use EOF as source location for an error expr, AST verifier
...
rightfully complains about improper source range nesting
<rdar://problem/16276969> Crash in swift::ide::isSourceInputComplete()
Swift SVN r15115
2014-03-16 21:49:47 +00:00
Argyrios Kyrtzidis
e38950ca4f
[Parser] Fix verifier crash with incomplete switch case statement.
...
Swift SVN r13437
2014-02-04 18:19:31 +00:00
Argyrios Kyrtzidis
0e12f527b3
[Parser] Fix verifier crash with case statements in incomplete source.
...
Swift SVN r13315
2014-02-02 03:14:35 +00:00
Argyrios Kyrtzidis
fa240a959b
[Parser] Fix verifier crash when a switch statement has unmatched brace.
...
Swift SVN r13314
2014-02-02 03:14:34 +00:00
Argyrios Kyrtzidis
8758451a43
[Parser/IDE] Introduce ide::isSourceInputComplete() which returns true if the input source is fully formed,
...
or false if, for example, a closing brace is missing.
This is useful for the REPL.
rdar://15948039
Swift SVN r13313
2014-02-02 03:14:33 +00:00