Add p_input_index()
This commit is contained in:
1 parent
c0016f6d58
commit
2ebdeaa995
8 files changed
+173
No files matched your search
@@ -1363,6 +1363,20 @@ void <%= @grammar.prefix %>set_position(<%= @grammar.prefix %>context_t * contex
|
||||
context->text_position = position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current input text byte offset.
|
||||
*
|
||||
* @param context
|
||||
* Lexer/parser context structure.
|
||||
*
|
||||
* @return Current input text byte offset (measured from the start of the
|
||||
* input text passed to <%= @grammar.prefix %>context_new()).
|
||||
*/
|
||||
size_t <%= @grammar.prefix %>input_index(<%= @grammar.prefix %>context_t * context)
|
||||
{
|
||||
return context->input_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user terminate code.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user