ast

package
v0.0.0-...-3c3c773 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjStart state = iota
	ObjOpen
	ObjProperty
	ObjComma

	// Property states
	PropertyStart
	PropertyKey
	PropertyColon

	// Array states
	ArrayStart
	ArrayOpen
	ArrayValue
	ArrayComma

	// String states
	StringStart
	StringQuoteOrChar
	Escape

	// Number states
	NumberStart
	NumberMinus
	NumberZero
	NumberDigit
	NumberPoint
	NumberDigitFraction
	NumberExp
	NumberExpDigitOrSign
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	Type     string
	Children []Value
	Start    int
	End      int
}

type Identifier

type Identifier struct {
	Type  string
	Value string
}

type Literal

type Literal struct {
	Type  string
	Value Value
}

type Object

type Object struct {
	Type     string
	Children []Property
	Start    int
	End      int
}

type Property

type Property struct {
	Type  string
	Key   Identifier
	Value Value
}

type RootNode

type RootNode struct {
	RootValue *Value
	Type      RootNodeType
}

type RootNodeType

type RootNodeType int
const (
	ObjectRoot RootNodeType = iota
	ArrayRoot
)

type Value

type Value any

Jump to

Keyboard shortcuts

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