ast

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright © 2024 Omni Aura peyton@omniaura.co

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name    string
	Content []byte
	Prompts []Prompt
}

func NewFile

func NewFile(name string, content []byte) (f File, err error)

func (File) Equal

func (f1 File) Equal(f2 File) bool

func (File) String

func (f File) String() string

type InputNode added in v0.3.0

type InputNode struct {
	Name     []byte
	Type     string // New: type of the variable ("string", "int", "bool", etc.)
	Subnodes []InputNode
}

func (InputNode) Equal added in v0.3.0

func (n InputNode) Equal(other InputNode) bool

func (InputNode) String added in v0.3.0

func (n InputNode) String() string

type InputStruct added in v0.3.0

type InputStruct struct {
	TopLevel []InputNode
}

func (InputStruct) Equal added in v0.3.0

func (i InputStruct) Equal(other InputStruct) bool

func (InputStruct) String added in v0.3.0

func (i InputStruct) String() string

type Prompt

type Prompt struct {
	// Title is the name of the prompt.
	Title coarse.Token
	// Nodes are the nodes of the prompt.
	Nodes []coarse.Token
}

func (Prompt) Equal

func (p1 Prompt) Equal(p2 Prompt) bool

func (Prompt) GetInputs added in v0.3.0

func (p Prompt) GetInputs(content []byte, c caseconv.Case) (ii InputStruct, err error)

func (Prompt) Stringify

func (p Prompt) Stringify(content []byte) string

func (Prompt) Vars

func (p Prompt) Vars(content []byte, c caseconv.Case) (vars [][]byte, length int)

Jump to

Keyboard shortcuts

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