diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-11-10 23:27:46 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-11-10 23:27:46 +0100 |
commit | b69e71479a1196cce8d27388883f9c0afbdf7e3a (patch) | |
tree | 5c96c8ce33dff1272a5ed00a8f6b911b71977e4b /src/mds-kbdc/raw-data.h | |
parent | mds-kbdc: more work on the treeification (diff) | |
download | mds-b69e71479a1196cce8d27388883f9c0afbdf7e3a.tar.gz mds-b69e71479a1196cce8d27388883f9c0afbdf7e3a.tar.bz2 mds-b69e71479a1196cce8d27388883f9c0afbdf7e3a.tar.xz |
mds-kbdc: more parsing into a tree
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-kbdc/raw-data.h')
-rw-r--r-- | src/mds-kbdc/raw-data.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mds-kbdc/raw-data.h b/src/mds-kbdc/raw-data.h index a0217d6..335afc6 100644 --- a/src/mds-kbdc/raw-data.h +++ b/src/mds-kbdc/raw-data.h @@ -81,6 +81,20 @@ void source_code_free(source_code_t* restrict this); /** + * Find the end of a function call + * + * @param content The code + * @param offset The index after the first character after the backslash + * that triggered this call + * @param size The length of `code` + * @return The index of the character after the bracket that closes + * the function call (may be outside the code by one character), + * or `size` if the call do not end (that is, the code ends + * prematurely), or zero if there is no function call at `offset` + */ +size_t get_end_of_call(char* restrict content, size_t offset, size_t size) __attribute__((pure)); + +/** * Read lines of a source file * * @param pathname The pathname of the source file |