Share via


IParseSink::MatchTriple Method

Called when a matching triple is parsed.

HRESULT MatchTriple ( 
   long startLine1,
   long startIdx1,
   long endLine1,
   long endIdx1,
   long startLine2,
   long startIdx2,
   long endLine2,
   long endIdx2,
   long startLine3,
   long startIdx3,
   long endLine3,
   long endIdx3
);

Parameters

  • startLine1
    [in] Specifies the starting line on which the first item in a matching triple occurs.

  • startIdx1
    [in] Specifies the starting index position on startLine1 for the first item in a matching triple.

  • endLine1
    [in] Specifies the ending line on which the first item in a matching triple occurs.

  • endIdx1
    [in] Specifies the ending index position on endLine1 for the first item in a matching triple.

  • startLine2
    [in] Specifies the starting line on which the second item in a matching triple occurs.

  • startIdx2
    [in] Specifies the starting index position on startLine1 for the second item in a matching triple.

  • endLine2
    [in] Specifies the ending line on which the second item in a matching triple occurs.

  • endIdx2
    [in] Specifies the ending index position on endLine1 for the second item in a matching triple.

  • startLine3
    [in] Specifies the starting line on which the third item in a matching triple occurs.

  • startIdx3
    [in] Specifies the starting index position on startLine1 for the third item in a matching triple.

  • endLine3
    [in] Specifies the ending line on which the third item in a matching triple occurs.

  • endIdx3
    [in] Specifies the ending index position on endLine1 for the third item in a matching triple.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

An example of a matching triple is "If", "Then", and "Else". Call this method only if your IBabelService::ParseSource Method implementation is called with a ParseReason Enumeration value of ReasonHighLightBraces or ReasonMatchBraces in the reason parameter. You should call IParseSink::MatchTriple once for each matching triple you find in the span of text passed to you in the text parameter of IBabelService::ParseSource Method.

The information in the MatchTriple method is used when auto-highlight matching braces is enabled and a user presses CTRL+] in Visual Studio.

See Also

Reference

IParseSink Interface

ParseReason Enumeration