ast

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package ast declares the types used to represent syntax trees.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	ValuePos int
	X        Node
	Index    int
}

An Index node represents an expression followed by an index.

func (*Index) Pos

func (e *Index) Pos() int

type Node

type Node interface {
	Pos() int
}

All node types implement the Node interface.

type Selector

type Selector struct {
	ValuePos int
	X        Node
	Sel      string
}

A Selector node represents an expression followed by a selector.

func (*Selector) Pos

func (e *Selector) Pos() int

Pos returns the position of first character belonging to the node.

Jump to

Keyboard shortcuts

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