statement

package
v0.0.0-...-1e7c8b3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package statement contains our statements.

A statement is a parsed command from the recipe-file.

A statement will be one of the fixed token-types we have defined and an array of "arguments".

For example the "Run "blah"" would become a statement with token "Run" and argument "blah".

We setup an array here, but the most arguments supported is two, for the CopyFile & CopyTemplate commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Statement

type Statement struct {
	// Token is the main action "Set", "Run", etc.
	Token token.Token

	// When running a command `Run`, `IfChanged` should we use
	// sudo?
	Sudo bool

	// Arguments contains the arguments to the operation.
	Arguments []token.Token
}

Statement holds a single statement to be executed.

Jump to

Keyboard shortcuts

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