lib

package
v0.0.0-...-d63bf21 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtractorErrorType = rnt.Cal(
	rnt.TypeType,
	rnt.NewStr("ExtractorError"),
	rnt.NewTuple(rnt.ExceptionType),
	rnt.NewDict()).(rnt.Type)

ExtractorErrorType ..

View Source
var ExtractorRunner rnt.Object

ExtractorRunner ..

View Source
var Extractors = make(map[string]rnt.Object)

Extractors ..

View Source
var RegisterExtractor = rnt.NewSimpleFunction("RegisterExtractor",
	[]string{"key", "class"},
	func(args []rnt.Object) rnt.Object {
		key := args[0].(rnt.Str).Value()
		class := args[1]
		Extractors[key] = class
		return rnt.None
	})

RegisterExtractor registers a new extractor class

View Source
var SetExtractorRunner = rnt.NewSimpleFunction("SetExtractorRunner",
	[]string{"runner"},
	func(args []rnt.Object) rnt.Object {
		ExtractorRunner = args[0]
		return rnt.None
	})

SetExtractorRunner is called by the generated code to provide an entry point into it, usable by the fixe code.

Functions

func NewStringlike

func NewStringlike(val string, st bool) rnt.Object

NewStringlike builds a str or bytes object having val as value, depending on st (True->str, False->bytes).

func StringlikeVal

func StringlikeVal(o rnt.Object) (string, bool)

StringlikeVal extracts the string value from a str or bytes typed object. Returns true in the second value if the string was a str.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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