Commit Graph

6 Commits

Author SHA1 Message Date
Xi Ge
f25925fc84 Parser: suppress diagnostics when parsing inside inactive code 2019-05-17 12:36:34 -07:00
Xi Ge
c8dd6a9ba1 Parser: avoid skipping inactive code if we are building syntax trees.
If syntax trees are requested, we shouldn't skip inactive code. Notice the
inactive code won't be skipped in SwiftSyntax because we always set
PerformConditionEvaluation false for the in-process parser.

This is mostly needed for testing purposes where we add -verify-syntax-tree
to regular compiler invocations.

rdar://50837165
2019-05-17 12:32:10 -07:00
Rintaro Ishizaki
22652f9e88 [Parse] Eliminate backtracking in collection expression parsing
Parsing collection literal expression used to take exponential time
depending on the nesting level of the first element.

Stop using 'parseList()' because using it complicates libSyntax parsing.

rdar://problem/45221238 / https://bugs.swift.org/browse/SR-9220
rdar://problem/38913395 / https://bugs.swift.org/browse/SR-7283
2018-12-25 11:05:23 +09:00
Alex Hoppen
bc528237e5 [libSyntax] Adjust tests for improved syntax parsing behaviour 2018-05-22 09:07:56 -07:00
Rintaro Ishizaki
9b182d108f [Syntax] Verify syntax tree only if we reached the real EOF
We used to verify the tree for every parseIntoSourceFile() invocation.
2018-05-08 16:38:11 +09:00
Rintaro Ishizaki
0480cc74aa [Syntax] Add test case for '-verify-syntax-tree' 2018-05-08 16:34:49 +09:00