iscript

package module
v0.0.0-...-70166a1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: GPL-3.0 Imports: 13 Imported by: 1

README

iscript

IRA Install/Remove/Append script language

Documentation

Index

Constants

View Source
const (
	Install int = iota
	Remove
	Update
)

Variables

This section is empty.

Functions

func GetFlag

func GetFlag(mode int) (string, bool)

GetFlag takes parse modifier and returns flag

func IsFlag

func IsFlag(text string) bool

IsFlag checks is string flag or not

Types

type Parser

type Parser struct {
	Debug bool // used in tests (verbose mode)
	// contains filtered or unexported fields
}

Parser is used to parse IScript

func NewParser

func NewParser(path string, installDir string) (*Parser, error)

NewParser creates a new parser and initialise it. path is a path to script. installDir is a directory where package is (or would be) installed debug must be used only in debug

func (*Parser) Reset

func (p *Parser) Reset(path string, installDir string) error

This function should be executed when either path or destination changed Parser must be stopped before resetting Syntax is the same as in NewParser

func (*Parser) Start

func (p *Parser) Start(mode int, srcDir string) error

This function starts parser. Mode set which section will be executed srcDir is a path to unpacked package. This parameter is required in Install and Update mode, but shouldn't be set in Remove mode (shold be blank string "")

Jump to

Keyboard shortcuts

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