[libIDE] Add syntax kind of argument to fix a crash. rdar://27377118

Argument used to have the same syntax kind with that of parameter. This patch
starts to differentiate them.
This commit is contained in:
Xi Ge
2016-07-19 15:00:29 -07:00
parent 4910b589ae
commit 195c737b54
8 changed files with 21 additions and 16 deletions

View File

@@ -139,6 +139,7 @@ static UIdent KindStmtSwitch("source.lang.swift.stmt.switch");
static UIdent KindStmtCase("source.lang.swift.stmt.case");
static UIdent KindStmtBrace("source.lang.swift.stmt.brace");
static UIdent KindExprCall("source.lang.swift.expr.call");
static UIdent KindExprArg("source.lang.swift.expr.argument");
static UIdent KindExprArray("source.lang.swift.expr.array");
static UIdent KindExprDictionary("source.lang.swift.expr.dictionary");
static UIdent KindExprObjectLiteral("source.lang.swift.expr.object_literal");
@@ -509,6 +510,8 @@ UIdent SwiftLangSupport::getUIDForSyntaxStructureKind(
return KindExprDictionary;
case SyntaxStructureKind::ObjectLiteralExpression:
return KindExprObjectLiteral;
case SyntaxStructureKind::Argument:
return KindExprArg;
}
}