Expand description
Fast line-oriented JSON tokenization.
The TextMate JSON grammar is expensive for large blobs because it drives a recursive regex stack. This module keeps JSON highlighting bounded and allocation-light by scanning one line at a time.
Constants§
- CONSTANT
- Scope id for JSON constants such as
true,false, andnull. - NUMBER
- Scope id for JSON numbers.
- PROPERTY_
NAME - Scope id for JSON property names.
- SCOPES
- Scope names emitted by
tokenize_line_into. - STRING
- Scope id for JSON string content.
- STRING_
PUNCTUATION - Scope id for JSON string delimiters.
Functions§
- tokenize_
line_ into - Tokenizes one JSON line into caller-owned storage.