Go to the source code of this file.
|
int | ohcount_parse (SourceFile *sourcefile, int count, void(*callback)(const char *, const char *, int, int, void *), void *userdata) |
|
◆ ohcount_parse()
int ohcount_parse |
( |
SourceFile * |
sourcefile, |
|
|
int |
count, |
|
|
void(*)(const char *, const char *, int, int, void *) |
callback, |
|
|
void * |
userdata |
|
) |
| |
Tries to use an existing Ragel parser for the given language.
- Parameters
-
sourcefile | A SourceFile created by ohcount_sourcefile_new(). |
count | An integer flag indicating whether to count lines or parse entities. |
callback | A callback to use for every line or entity in the source file discovered (depends on count). |
userdata | Pointer to userdata used by callback (if any). |
- Returns
- 1 if a Ragel parser is found, 0 otherwise.