MiniQuake2

src/miniquake2/game/base/entity_parser.ml

Provides miniquake2 game base entity parser facilities for this project.

Package
miniquake2.game.base.entity_parser
Reachable
Yes

Imports

Declarations

appendUnknown

function appendUnknown(entity, key)

Append unknown.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
keydynamic—key value consumed by this operation.

View source

createScanner

function createScanner(value)

Create scanner.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

ED_NewString

function ED_NewString(value)

Exact ED_NewString behavior: \n becomes a newline; every other backslash pair becomes one literal backslash and discards the second byte.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

ED_ParseField

function ED_ParseField(entity, key, value)

Returns true for a recognized field and false for the original diagnostic path ("... is not a field"). Utility keys beginning with _ are ignored.

ParameterTypeDefaultDescription
entitydynamic—entity value consumed by this operation.
keydynamic—key value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.

View source

finishPrefix

function finishPrefix(values, count)

Finish prefix.

ParameterTypeDefaultDescription
valuesdynamic—values value consumed by this operation.
countdynamic—Number of items or units to process.

View source

isWhitespace

function isWhitespace(value)

Report whether is whitespace.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

materialize

function materialize(parsed)

Materialize state.

ParameterTypeDefaultDescription
parseddynamic—parsed value consumed by this operation.

View source

nextToken

function nextToken(scanner)

Return the next token value.

ParameterTypeDefaultDescription
scannerdynamic—scanner value consumed by this operation.

View source

parseEntities

function parseEntities(value)

Parse entities.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

parseInteger

function parseInteger(value, fieldName)

Parse integer.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
fieldNamedynamic—fieldName value consumed by this operation.

View source

parseMaterializedEntities

function parseMaterializedEntities(value)

Production spawn ingestion deliberately does not retain EntityPair token strings. Each field is consumed while both scanner tokens and the target BaseEntity are live locals, so a long sequence of retail level loads cannot expose an old pair through a later allocation/collection boundary. The ParsedEntity API above remains available for syntax/contract inspection.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

parseNumber

function parseNumber(value, fieldName)

Parse number.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
fieldNamedynamic—fieldName value consumed by this operation.

View source

parserError

function parserError(code, offset, message)

Return the parser error value.

ParameterTypeDefaultDescription
codedynamic—code value consumed by this operation.
offsetdynamic—Zero-based offset at which processing starts.
messagedynamic—Human-readable message associated with the operation.

View source

parseVector

function parseVector(value, fieldName)

Parse vector.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
fieldNamedynamic—fieldName value consumed by this operation.

View source

skipTrivia

function skipTrivia(scanner)

Return the skip trivia value.

ParameterTypeDefaultDescription
scannerdynamic—scanner value consumed by this operation.

View source