coloring

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorAliasNameSymbol

func ColorAliasNameSymbol(t token.TypeSymbolToken) string

func ColorCharacterToken

func ColorCharacterToken(t token.CharacterToken) string

func ColorDefinition

func ColorDefinition(t token.VariableSymbolToken) string

func ColorKeywordString

func ColorKeywordString(t string) string

func ColorLocalType

func ColorLocalType(t token.VariableSymbolToken) string

func ColorModuleReference

func ColorModuleReference(t token.TypeSymbolToken) string

func ColorNumberLiteral

func ColorNumberLiteral(t token.NumberToken) string

func ColorOperator

func ColorOperator(t token.OperatorToken) string

func ColorOperatorString

func ColorOperatorString(t string) string

func ColorPrimitiveType

func ColorPrimitiveType(t token.TypeSymbolToken) string

func ColorRecordField

func ColorRecordField(t token.VariableSymbolToken) string

func ColorResourceNameSymbol

func ColorResourceNameSymbol(t token.ResourceName) string

func ColorTypeGeneratorName

func ColorTypeGeneratorName(t token.TypeSymbolToken) string

func ColorTypeIdSymbol

func ColorTypeIdSymbol(t token.TypeId) string

func ColorTypeSymbol

func ColorTypeSymbol(t token.TypeSymbolToken) string

func ColorVariableSymbol

func ColorVariableSymbol(t token.VariableSymbolToken) string

func SyntaxColor

func SyntaxColor(code string) (string, error)

Types

type Colorer

type Colorer interface {
	Operator(t token.OperatorToken)
	VariableSymbol(t token.VariableSymbolToken)
	Definition(t token.VariableSymbolToken)
	LocalType(t token.VariableSymbolToken)
	Parameter(t token.VariableSymbolToken)
	RecordField(t token.VariableSymbolToken)
	TypeSymbol(t token.TypeSymbolToken)
	TypeGeneratorName(t token.TypeSymbolToken)
	ModuleReference(t token.TypeSymbolToken)
	PrimitiveType(t token.TypeSymbolToken)
	AliasNameSymbol(t token.TypeSymbolToken)
	NumberLiteral(t token.NumberToken)
	BooleanLiteral(t token.BooleanToken)
	KeywordString(t string)
	NewLine(indentation int)
	OperatorString(t string)
	StringLiteral(s token.StringToken)
	OneSpace()
	RightArrow()
	RightPipe()
	LeftPipe()
	String() string
	UserInstruction(t string)
}

type ColorerWithColor

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

func NewColorerWithColor

func NewColorerWithColor() *ColorerWithColor

func (*ColorerWithColor) AliasNameSymbol

func (c *ColorerWithColor) AliasNameSymbol(t token.TypeSymbolToken)

func (*ColorerWithColor) BooleanLiteral

func (c *ColorerWithColor) BooleanLiteral(t token.BooleanToken)

func (*ColorerWithColor) Definition

func (c *ColorerWithColor) Definition(t token.VariableSymbolToken)

func (*ColorerWithColor) KeywordString

func (c *ColorerWithColor) KeywordString(t string)

func (*ColorerWithColor) LeftPipe

func (c *ColorerWithColor) LeftPipe()

func (*ColorerWithColor) LocalType

func (c *ColorerWithColor) LocalType(operator token.VariableSymbolToken)

func (*ColorerWithColor) ModuleReference

func (c *ColorerWithColor) ModuleReference(t token.TypeSymbolToken)

func (*ColorerWithColor) NewLine

func (c *ColorerWithColor) NewLine(indentation int)

func (*ColorerWithColor) NumberLiteral

func (c *ColorerWithColor) NumberLiteral(t token.NumberToken)

func (*ColorerWithColor) OneSpace

func (c *ColorerWithColor) OneSpace()

func (*ColorerWithColor) Operator

func (c *ColorerWithColor) Operator(t token.OperatorToken)

func (*ColorerWithColor) OperatorString

func (c *ColorerWithColor) OperatorString(operator string)

func (*ColorerWithColor) Parameter

func (c *ColorerWithColor) Parameter(t token.VariableSymbolToken)

func (*ColorerWithColor) PrimitiveType

func (c *ColorerWithColor) PrimitiveType(t token.TypeSymbolToken)

func (*ColorerWithColor) RecordField

func (c *ColorerWithColor) RecordField(t token.VariableSymbolToken)

func (*ColorerWithColor) RightArrow

func (c *ColorerWithColor) RightArrow()

func (*ColorerWithColor) RightPipe

func (c *ColorerWithColor) RightPipe()

func (*ColorerWithColor) String

func (c *ColorerWithColor) String() string

func (*ColorerWithColor) StringLiteral

func (c *ColorerWithColor) StringLiteral(t token.StringToken)

func (*ColorerWithColor) TypeGeneratorName

func (c *ColorerWithColor) TypeGeneratorName(t token.TypeSymbolToken)

func (*ColorerWithColor) TypeSymbol

func (c *ColorerWithColor) TypeSymbol(t token.TypeSymbolToken)

func (*ColorerWithColor) UserInstruction

func (c *ColorerWithColor) UserInstruction(t string)

func (*ColorerWithColor) VariableSymbol

func (c *ColorerWithColor) VariableSymbol(t token.VariableSymbolToken)

type ColorerWithoutColor

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

func NewColorerWithoutColor

func NewColorerWithoutColor() *ColorerWithoutColor

func (*ColorerWithoutColor) AliasNameSymbol

func (c *ColorerWithoutColor) AliasNameSymbol(t token.TypeSymbolToken)

func (*ColorerWithoutColor) BooleanLiteral

func (c *ColorerWithoutColor) BooleanLiteral(t token.BooleanToken)

func (*ColorerWithoutColor) Definition

func (*ColorerWithoutColor) KeywordString

func (c *ColorerWithoutColor) KeywordString(t string)

func (*ColorerWithoutColor) LeftPipe

func (c *ColorerWithoutColor) LeftPipe()

func (*ColorerWithoutColor) LocalType

func (*ColorerWithoutColor) ModuleReference

func (c *ColorerWithoutColor) ModuleReference(t token.TypeSymbolToken)

func (*ColorerWithoutColor) NewLine

func (c *ColorerWithoutColor) NewLine(indentation int)

func (*ColorerWithoutColor) NumberLiteral

func (c *ColorerWithoutColor) NumberLiteral(t token.NumberToken)

func (*ColorerWithoutColor) OneSpace

func (c *ColorerWithoutColor) OneSpace()

func (*ColorerWithoutColor) Operator

func (c *ColorerWithoutColor) Operator(t token.OperatorToken)

func (*ColorerWithoutColor) OperatorString

func (c *ColorerWithoutColor) OperatorString(operator string)

func (*ColorerWithoutColor) Parameter

func (*ColorerWithoutColor) PrimitiveType

func (c *ColorerWithoutColor) PrimitiveType(t token.TypeSymbolToken)

func (*ColorerWithoutColor) RecordField

func (c *ColorerWithoutColor) RecordField(t token.VariableSymbolToken)

func (*ColorerWithoutColor) RightArrow

func (c *ColorerWithoutColor) RightArrow()

func (*ColorerWithoutColor) RightPipe

func (c *ColorerWithoutColor) RightPipe()

func (*ColorerWithoutColor) String

func (c *ColorerWithoutColor) String() string

func (*ColorerWithoutColor) StringLiteral

func (c *ColorerWithoutColor) StringLiteral(t token.StringToken)

func (*ColorerWithoutColor) TypeGeneratorName

func (c *ColorerWithoutColor) TypeGeneratorName(t token.TypeSymbolToken)

func (*ColorerWithoutColor) TypeSymbol

func (c *ColorerWithoutColor) TypeSymbol(t token.TypeSymbolToken)

func (*ColorerWithoutColor) UserInstruction

func (c *ColorerWithoutColor) UserInstruction(t string)

func (*ColorerWithoutColor) VariableSymbol

func (c *ColorerWithoutColor) VariableSymbol(t token.VariableSymbolToken)

type DecoratedColorer added in v0.0.4

type DecoratedColorer interface {
	Operator(t token.OperatorToken)
	CustomType(t *dectype.CustomTypeAtom)
	CustomTypeName(t *dectype.CustomTypeReference)
	NewLine(indentation int)
	OperatorString(s string)
	OneSpace()
	CustomTypeVariant(t *dectype.CustomTypeVariantAtom)
	InvokerType(t *dectype.InvokerType)
	RecordTypeField(t *dectype.RecordField)
	AliasName(t *dectype.Alias)
	KeywordString(s string)
	UnmanagedName(s *ast.UnmanagedType)
	PrimitiveTypeName(identifier *ast.TypeIdentifier)
	RightArrow()
	LocalTypeName(localType *dectype.LocalType)
}

Jump to

Keyboard shortcuts

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