klyn.code.cpp.CppTokenizer.classifyIdentifier
method
public override classifyIdentifier(
token as String,
line as String,
endIndex as Long,
previousWord as String,
inQueryBlock as Boolean
) as TokenKind
Description

Classifies C and C++ identifiers, recognizing POSIX/standard *_t typedefs, typename parameters, and std:: / template type references.

Parameters
ParameterDescription
tokenIdentifier text.
lineFull source line.
endIndexExclusive end index of token in line.
previousWordImmediately preceding word on the line.
inQueryBlockUnused in C/C++ (false).
Returns

Resolved TokenKind.

Example
import klyn.code
import klyn.code.cpp

t = CppTokenizer()
assert t.classifyIdentifier("vector", "std::vector<int> v;", 11, "std", false) == TokenKind.TYPE
assert t.classifyIdentifier("pid_t", "pid_t id = 0;", 5, "", false) == TokenKind.TYPE