本文整理汇总了C#中ParseTree.EscapeMergeAction方法的典型用法代码示例。如果您正苦于以下问题:C# ParseTree.EscapeMergeAction方法的具体用法?C# ParseTree.EscapeMergeAction怎么用?C# ParseTree.EscapeMergeAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParseTree
的用法示例。
在下文中一共展示了ParseTree.EscapeMergeAction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseSQL
//.........这里部分代码省略.........
}
else
sqlTree.SaveNewElementWithError(SqlXmlConstants.ENAME_OTHERNODE, token.Value);
}
else if (significantTokensString.StartsWith("ON "))
{
sqlTree.EscapeAnySelectionTarget();
if (sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_MERGE_USING))
{
sqlTree.MoveToAncestorContainer(1, SqlXmlConstants.ENAME_MERGE_CLAUSE);
sqlTree.StartNewContainer(SqlXmlConstants.ENAME_MERGE_CONDITION, token.Value, SqlXmlConstants.ENAME_CONTAINER_GENERALCONTENT);
}
else if (!sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_DDL_PROCEDURAL_BLOCK)
&& !sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_DDL_OTHER_BLOCK)
&& !sqlTree.PathNameMatches(1, SqlXmlConstants.ENAME_DDL_WITH_CLAUSE)
&& !sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_EXPRESSION_PARENS)
&& !ContentStartsWithKeyword(sqlTree.CurrentContainer, "SET")
)
{
sqlTree.StartNewContainer(SqlXmlConstants.ENAME_JOIN_ON_SECTION, token.Value, SqlXmlConstants.ENAME_CONTAINER_GENERALCONTENT);
}
else
{
sqlTree.SaveNewElement(SqlXmlConstants.ENAME_OTHERKEYWORD, token.Value);
}
}
else if (significantTokensString.StartsWith("CASE "))
{
sqlTree.StartNewContainer(SqlXmlConstants.ENAME_CASE_STATEMENT, token.Value, SqlXmlConstants.ENAME_CASE_INPUT);
}
else if (significantTokensString.StartsWith("WHEN "))
{
sqlTree.EscapeMergeAction();
if (sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_CASE_INPUT)
|| (sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_CONTAINER_GENERALCONTENT)
&& sqlTree.PathNameMatches(1, SqlXmlConstants.ENAME_CASE_THEN)
)
)
{
if (sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_CASE_INPUT))
sqlTree.MoveToAncestorContainer(1, SqlXmlConstants.ENAME_CASE_STATEMENT);
else
sqlTree.MoveToAncestorContainer(3, SqlXmlConstants.ENAME_CASE_STATEMENT);
sqlTree.StartNewContainer(SqlXmlConstants.ENAME_CASE_WHEN, token.Value, SqlXmlConstants.ENAME_CONTAINER_GENERALCONTENT);
}
else if ((sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_CONTAINER_GENERALCONTENT)
&& sqlTree.PathNameMatches(1, SqlXmlConstants.ENAME_MERGE_CONDITION)
)
|| sqlTree.PathNameMatches(0, SqlXmlConstants.ENAME_MERGE_WHEN)
)
{
if (sqlTree.PathNameMatches(1, SqlXmlConstants.ENAME_MERGE_CONDITION))
sqlTree.MoveToAncestorContainer(2, SqlXmlConstants.ENAME_MERGE_CLAUSE);
else
sqlTree.MoveToAncestorContainer(1, SqlXmlConstants.ENAME_MERGE_CLAUSE);
sqlTree.StartNewContainer(SqlXmlConstants.ENAME_MERGE_WHEN, token.Value, SqlXmlConstants.ENAME_CONTAINER_GENERALCONTENT);
}
else
sqlTree.SaveNewElementWithError(SqlXmlConstants.ENAME_OTHERNODE, token.Value);
}
else if (significantTokensString.StartsWith("THEN "))
{