encoder

package
v0.0.0-...-7d7180d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeOffsetKind = iota * 4
	NodeOffsetPos
	NodeOffsetEnd
	NodeOffsetNext
	NodeOffsetParent
	NodeOffsetData
	// NodeSize is the number of bytes that represents a single node in the encoded format.
	NodeSize
)
View Source
const (
	NodeDataTypeChildren uint32 = iota << 30
	NodeDataTypeString
	NodeDataTypeExtendedData
)
View Source
const (
	NodeDataTypeMask        uint32 = 0xc0_00_00_00
	NodeDataChildMask       uint32 = 0x00_00_00_ff
	NodeDataStringIndexMask uint32 = 0x00_ff_ff_ff
)
View Source
const (
	HeaderOffsetMetadata = iota * 4
	HeaderOffsetStringOffsets
	HeaderOffsetStringData
	HeaderOffsetExtendedData
	HeaderOffsetNodes
	HeaderSize
)
View Source
const (
	ProtocolVersion uint8 = 1
)
View Source
const (
	SyntaxKindNodeList uint32 = 1<<32 - 1
)

Variables

This section is empty.

Functions

func EncodeSourceFile

func EncodeSourceFile(sourceFile *ast.SourceFile, id string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL