token

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright © 2024 Omni Aura peyton@omniaura.co

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	KindUnset = iota
	KindTitle
	KindText
	// TODO: add var parameters
	// such as:
	// <!name string>
	// <!age int>
	// <!is_admin bool>
	// <!created_at datetime>
	// <!meeting_time time>
	// <!meeting_date date>
	// <!any_data any>
	// <!todos string list join="\n">
	// <!weights float32 list join=",">
	// <!flags bool list join="," start="[" end="]">
	// <!names join="\n">
	KindVar
	KindRawBlock
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind int

func (Kind) String

func (k Kind) String() string

type Slice

type Slice []T

func Tokenize

func Tokenize(input []byte) (Slice, error)

func (Slice) Equal

func (t Slice) Equal(o Slice) bool

func (Slice) Stringify

func (s Slice) Stringify(in []byte) string

type T

type T struct {
	Kind  Kind
	Start int
	End   int
}

func (T) Get

func (t T) Get(in []byte) []byte

func (T) GetJSFmtVar

func (t T) GetJSFmtVar(in []byte) []byte

func (T) GetWrap

func (t T) GetWrap(in []byte, left, right byte) []byte

func (T) GetWrapLL

func (t T) GetWrapLL(in []byte, left []byte, right byte) []byte

func (T) Stringify

func (t T) Stringify(in []byte) string

Jump to

Keyboard shortcuts

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