MCPcopy Index your code
hub / github.com/microsoft/typescript-go / encodeParseOptions

Function encodeParseOptions

internal/api/encoder/encoder.go:293–302  ·  view source on GitHub ↗

encodeParseOptions encodes the per-file ExternalModuleIndicatorOptions as a uint32 bitmask.

(opts ast.ExternalModuleIndicatorOptions)

Source from the content-addressed store, hash-verified

291
292// encodeParseOptions encodes the per-file ExternalModuleIndicatorOptions as a uint32 bitmask.
293func encodeParseOptions(opts ast.ExternalModuleIndicatorOptions) uint32 {
294 var bits uint32
295 if opts.JSX {
296 bits |= 1
297 }
298 if opts.Force {
299 bits |= 2
300 }
301 return bits
302}
303
304// NodeIndexTable maps between AST nodes and their encoder indices for O(1) node handle resolution.
305type NodeIndexTable struct {

Callers 1

encodeTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected