public isPreprocessorLine(line as String, firstNonSpace as Long) as Boolean
Checks whether the line starts with a preprocessor directive (such as #include or #define).
| Parameter | Description |
|---|---|
line | Source line text. |
firstNonSpace | Index of the first non-whitespace character on line. |
true when line is a preprocessor directive.
import klyn.code
t = CodeTokenizer(LanguageProfile("cpp", "C++").withPreprocessorPrefix("#"))
assert t.isPreprocessorLine("#include <vector>", 0)