parser

package
v0.0.0-...-217e18f Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SelectedPrefixesGroups = map[string][][]string{

	"input.h": {
		{"ID_"},
		{"BUS_"},
		{"MT_TOOL_"},
		{"FF_"},
	},
	"input-event-codes.h": {
		{"INPUT_PROP_"},
		{"EV_"},
		{"SYN_"},
		{"KEY_", "BTN_"},
		{"REL_"},
		{"ABS_"},
		{"SW_"},
		{"MSC_"},
		{"LED_"},
		{"REP_"},
		{"SND_"},
	},
}

Functions

func GenerateFile

func GenerateFile(rawGroups []Group, disableComments bool, selectedTag, inputHURL, eventCodesURL string) string

Types

type CodeProcessor

type CodeProcessor struct {
	// contains filtered or unexported fields
}

func NewCodeProcessor

func NewCodeProcessor(prefixesGroups [][]string) CodeProcessor

func (*CodeProcessor) ProcessFile

func (p *CodeProcessor) ProcessFile(file io.Reader) ([]Group, error)

type EncodingType

type EncodingType string
const (
	EncodingUnknown  EncodingType = ""
	EncodingHex      EncodingType = "hex"
	EncodingInteger  EncodingType = "int"
	EncodingText     EncodingType = "text"     // e.g. "SOME_OTHER_CONST_NAME"
	EncodingEquation EncodingType = "equation" // e.g. "(CONST_NAME + 1)"
)

type Group

type Group struct {
	// contains filtered or unexported fields
}

Group contains list of elements (separator, comment or constant)

func NewGroup

func NewGroup() Group

Jump to

Keyboard shortcuts

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