Skip to main content Module utils Copy item path Source is_part_of_identifier Check if a byte can be part of an identifier (a-z, A-Z, 0-9, _, or >= 0x80) is_start_of_identifier Check if a byte can start an identifier (a-z, A-Z, _) parse_literal_float Parses a PHP literal float, handling underscore separators. parse_literal_integer Parses a PHP literal integer with support for binary, octal, decimal, and hex. parse_literal_string Parses a PHP literal string, handling all escape sequences, and returns the result as a String. parse_literal_string_in Parses a PHP literal string, handling all escape sequences, and allocates the result in an arena. read_digits_of_base Reads a sequence of bytes representing digits in a specific numerical base. scan_identifier_length Scans an identifier starting at offset in the byte slice and returns the length.
Assumes the first byte is already validated as a start of identifier.
Returns the total length of the identifier (including the first byte).