Udostępnij za pośrednictwem


ParseReason Enumeration

Specifies the reason why the parser is called in a Babel Package language service.

enum ParseReason { 
   ReasonColorize, 
   ReasonCheck, 
   ReasonMemberSelect, 
   ReasonCompleteWord, 
   ReasonQuickInfo, 
   ReasonMethodTip, 
   ReasonMatchBraces, 
   ReasonHighlightBraces, 
   ReasonAutos, 
   ReasonCodeSpan 
};

Elements

  • ReasonColorize
    Parse the text to obtain token information that is used to colorize the line.

  • ReasonCheck
    Perform a complete parse of the entire text, gathering as much information as possible about the source. This information can later be used to satisfy other parse reasons.

  • ReasonMemberSelect
    Parse the separator character before the current location as well as the identifier before it to obtain a list of members for the associated class.

  • ReasonCompleteWord
    Parse to get the partially completed word before the current position in order to show a list of possible completions (members, arguments, methods).

  • ReasonQuickInfo
    Parse the identifier or selection at the given location to obtain type information to be shown in an IntelliSense quick info tool tip.

  • ReasonMethodTip
    Parse the method name before the current position to produce a list of all overloaded method signatures that match the method name.

  • ReasonMatchBraces
    Parse the language pair at the given location to finds its match.

  • ReasonHighlightBraces
    Parse to find the matching language pairs (such as "{" and "}" or "<" and ">") that enclose the given location so they can be highlighted.

  • ReasonAutos
    Parse the code block at the given location to obtain any expressions that might be of interest in the Autos debugging window (an expression is the name of a variable or parameter that can be evaluated to produce a value).

  • ReasonCodeSpan
    Parse the section of code containing the specified location to find the extent of the statement. Used in validating breakpoints.

Remarks

An IBabelService::ParseSource Method implementation can be optimized by only doing the work that is required given the parse reason. For example, an IScope Interface object only needs to be built when the reason is ReasonCheck. For more information about when each ParseReason value is used, see the IParseSink Interface.

Requirements

Header: babelservice.idl

See Also

Reference

IBabelService::ParseSource Method

Other Resources

Babel Enumerations