ast

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package ast is the Abstract Syntax Tree module for Orion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expr

type Expr struct {
	Type ExprType // The type of this expression [ExprType].
	Id   string   // Either the value of any data or the name of a function.
	Args []*Expr  // If this is a function or argument list, this is filled.
}

An Expr represents an expression in Orion. The zero value for Expr is an empty expression i.e the "nil" value.

type ExprType

type ExprType int

An ExprType conveys the expression type of an Expr.

const (
	Expr_String ExprType = iota
	Expr_FuncCall
	Expr_Number
)

The type of an Expr is one of these types.

Jump to

Keyboard shortcuts

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