Describe the attributes of a single character of source text.
typedef WORD SOURCE_TEXT_ATTR; |
Constants
Constant | Value | Description |
---|---|---|
SOURCETEXT_ATTR_KEYWORD |
0x0001 |
The character is part of a language keyword. For example, the VBScript keyword While. |
SOURCETEXT_ATTR_COMMENT |
0x0002 |
The character is part of a comment block. |
SOURCETEXT_ATTR_NONSOURCE |
0x0004 |
The character is not part of compiled language source text. For example, the HTML surrounding a script block. |
SOURCETEXT_ATTR_OPERATOR |
0x0008 |
The character is part of a language operator. For example:, the arithmetic operator +. |
SOURCETEXT_ATTR_NUMBER |
0x0010 |
The character is part of a language numeric constant. For example, the constant 3.14159. |
SOURCETEXT_ATTR_STRING |
0x0020 |
The character is part of a language string constant. For example, the string "Hello World". |
SOURCETEXT_ATTR_FUNCTION_START |
0x0040 |
The character indicates the start of a function block |
SOURCETEXT_ATTR_IDENTIFIER |
0x0100 |
The character is part of an identifier. |
SOURCETEXT_ATTR_MEMBERLOOKUP |
0x0200 |
The character is a dot operator. For example, the dot in the Object.Property |
SOURCETEXT_ATTR_THIS |
0x0400 |
The character is part of the identifier that represents the current object. For example, this in JScript or Me in VBScript. |
SOURCETEXT_ATTR_HUMANTEXT |
0x8000 |
The character is in the non-delimiter portion of string literals or comment. For example, characters between string delimiters. |
Remarks
Typically, the IDebugDocumentHost::GetScriptTextAttributes, IActiveScriptDebug::GetScriptletTextAttributes, and IActiveScriptDebug::GetScriptTextAttributes methods return one text attribute per character, unless:
-
The GETATTRTYPE_DEPSCAN flag is set, in which case the method may return the SOURCETEXT_ATTR_IDENTIFIER and SOURCETEXT_ATTR_MEMBERLOOKUP flags,
-
The GETATTRFLAG_THIS flag is set, in which case the method may return the SOURCETEXT_ATTR_THIS flag,
-
The GETATTRFLAG_HUMANTEXT flag is set, in which case the method may return the SOURCETEXT_ATTR_HUMANTEXT flag.
See Also
