Documentation ¶
Index ¶
- func ColorAliasNameSymbol(t token.TypeSymbolToken) string
- func ColorCharacterToken(t token.CharacterToken) string
- func ColorDefinition(t token.VariableSymbolToken) string
- func ColorKeywordString(t string) string
- func ColorLocalType(t token.VariableSymbolToken) string
- func ColorModuleReference(t token.TypeSymbolToken) string
- func ColorNumberLiteral(t token.NumberToken) string
- func ColorOperator(t token.OperatorToken) string
- func ColorOperatorString(t string) string
- func ColorPrimitiveType(t token.TypeSymbolToken) string
- func ColorRecordField(t token.VariableSymbolToken) string
- func ColorResourceNameSymbol(t token.ResourceName) string
- func ColorTypeGeneratorName(t token.TypeSymbolToken) string
- func ColorTypeIdSymbol(t token.TypeId) string
- func ColorTypeSymbol(t token.TypeSymbolToken) string
- func ColorVariableSymbol(t token.VariableSymbolToken) string
- func SyntaxColor(code string) (string, error)
- type Colorer
- type ColorerWithColor
- func (c *ColorerWithColor) AliasNameSymbol(t token.TypeSymbolToken)
- func (c *ColorerWithColor) BooleanLiteral(t token.BooleanToken)
- func (c *ColorerWithColor) Definition(t token.VariableSymbolToken)
- func (c *ColorerWithColor) KeywordString(t string)
- func (c *ColorerWithColor) LeftPipe()
- func (c *ColorerWithColor) LocalType(operator token.VariableSymbolToken)
- func (c *ColorerWithColor) ModuleReference(t token.TypeSymbolToken)
- func (c *ColorerWithColor) NewLine(indentation int)
- func (c *ColorerWithColor) NumberLiteral(t token.NumberToken)
- func (c *ColorerWithColor) OneSpace()
- func (c *ColorerWithColor) Operator(t token.OperatorToken)
- func (c *ColorerWithColor) OperatorString(operator string)
- func (c *ColorerWithColor) Parameter(t token.VariableSymbolToken)
- func (c *ColorerWithColor) PrimitiveType(t token.TypeSymbolToken)
- func (c *ColorerWithColor) RecordField(t token.VariableSymbolToken)
- func (c *ColorerWithColor) RightArrow()
- func (c *ColorerWithColor) RightPipe()
- func (c *ColorerWithColor) String() string
- func (c *ColorerWithColor) StringLiteral(t token.StringToken)
- func (c *ColorerWithColor) TypeGeneratorName(t token.TypeSymbolToken)
- func (c *ColorerWithColor) TypeSymbol(t token.TypeSymbolToken)
- func (c *ColorerWithColor) UserInstruction(t string)
- func (c *ColorerWithColor) VariableSymbol(t token.VariableSymbolToken)
- type ColorerWithoutColor
- func (c *ColorerWithoutColor) AliasNameSymbol(t token.TypeSymbolToken)
- func (c *ColorerWithoutColor) BooleanLiteral(t token.BooleanToken)
- func (c *ColorerWithoutColor) Definition(t token.VariableSymbolToken)
- func (c *ColorerWithoutColor) KeywordString(t string)
- func (c *ColorerWithoutColor) LeftPipe()
- func (c *ColorerWithoutColor) LocalType(t token.VariableSymbolToken)
- func (c *ColorerWithoutColor) ModuleReference(t token.TypeSymbolToken)
- func (c *ColorerWithoutColor) NewLine(indentation int)
- func (c *ColorerWithoutColor) NumberLiteral(t token.NumberToken)
- func (c *ColorerWithoutColor) OneSpace()
- func (c *ColorerWithoutColor) Operator(t token.OperatorToken)
- func (c *ColorerWithoutColor) OperatorString(operator string)
- func (c *ColorerWithoutColor) Parameter(t token.VariableSymbolToken)
- func (c *ColorerWithoutColor) PrimitiveType(t token.TypeSymbolToken)
- func (c *ColorerWithoutColor) RecordField(t token.VariableSymbolToken)
- func (c *ColorerWithoutColor) RightArrow()
- func (c *ColorerWithoutColor) RightPipe()
- func (c *ColorerWithoutColor) String() string
- func (c *ColorerWithoutColor) StringLiteral(t token.StringToken)
- func (c *ColorerWithoutColor) TypeGeneratorName(t token.TypeSymbolToken)
- func (c *ColorerWithoutColor) TypeSymbol(t token.TypeSymbolToken)
- func (c *ColorerWithoutColor) UserInstruction(t string)
- func (c *ColorerWithoutColor) VariableSymbol(t token.VariableSymbolToken)
- type DecoratedColorer
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 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 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 ColorTypeSymbol ¶
func ColorTypeSymbol(t token.TypeSymbolToken) string
func ColorVariableSymbol ¶
func ColorVariableSymbol(t token.VariableSymbolToken) string
func SyntaxColor ¶
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 (c *ColorerWithoutColor) Definition(t token.VariableSymbolToken)
func (*ColorerWithoutColor) KeywordString ¶
func (c *ColorerWithoutColor) KeywordString(t string)
func (*ColorerWithoutColor) LeftPipe ¶
func (c *ColorerWithoutColor) LeftPipe()
func (*ColorerWithoutColor) LocalType ¶
func (c *ColorerWithoutColor) LocalType(t token.VariableSymbolToken)
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 (c *ColorerWithoutColor) Parameter(t token.VariableSymbolToken)
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) }
Click to show internal directories.
Click to hide internal directories.