Files
swift-mirror/lib/IDE/SyntaxModel.cpp
Ben Langmuir 74113f92ce [syntax-map] Fix array-of-object-literal syntax map, argument label keywords
Argument labels are allowed to use keywords, in which case we want to
treat them as identifiers in the syntax map (except for '_'). This
commit moves calculation of that into the original lexing instead of
in the model walker, which makes it much more robust, since the model
walker was only guessing about what was next on the the TokenNodes list.

This fixes a bug where arrays of object literals would only have the
first object correct (the following ones were identifiers), as well as
some incorrect cases where we treated keywords as identifiers.

rdar://problem/27726422
2016-08-09 10:25:42 -07:00

53 KiB