Improve ts_language_symbol_for_name function

This commit is contained in:
Max Brunsfeld 2019-11-15 14:21:13 -08:00
parent 660efd8c0f
commit ce633a85c6
4 changed files with 27 additions and 31 deletions

View file

@ -817,7 +817,12 @@ const char *ts_language_symbol_name(const TSLanguage *, TSSymbol);
/**
* Get the numerical id for the given node type string.
*/
TSSymbol ts_language_symbol_for_name(const TSLanguage *, const char *);
TSSymbol ts_language_symbol_for_name(
const TSLanguage *self,
const char *string,
uint32_t length,
bool is_named
);
/**
* Get the number of distinct field names in the language.