builder

package
v0.0.0-...-e9866e7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) 2021 Ke Yuchang(aceking.ke@gmail.com). All rights reserved. Use of this source code is governed by MIT license that can be found in the LICENSE file.

Copyright (c) 2021 Ke Yuchang(aceking.ke@gmail.com). All rights reserved. Use of this source code is governed by MIT license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TemplateGenFromString

func TemplateGenFromString(input string, file string) error

func TsGenFromString

func TsGenFromString(input string, file string) error

Types

type TemplateBuilder

type TemplateBuilder struct {
	NeedPacked     bool
	HttpParser     bool
	NTerminals     int
	HeaderPart     string
	CodeHeader     string
	ConstPart      string
	UnionPart      string
	AnalyTable     string
	PackAnalyTable string
	CodeLast       string
	StateFunc      string
	ReduceFunc     string
	Translate      string
	TranslateTrace string
	ReduceTrace    string
	// contains filtered or unexported fields
}

TODO: add the class model, not use global variables.

func NewTemplateBuilder

func NewTemplateBuilder(w *parser.Walker) *TemplateBuilder

func (*TemplateBuilder) WriteFile

func (b *TemplateBuilder) WriteFile(f *os.File)

type TsBuilder

type TsBuilder struct {
	HeaderPart string
	CodeHeader string
	ConstPart  string
	UnionPart  string
	AnalyTable string
	CodeLast   string
	StateFunc  string
	ReduceFunc string
	Translate  string
	// contains filtered or unexported fields
}

func NewTsBuilder

func NewTsBuilder(w *parser.Walker) *TsBuilder

Jump to

Keyboard shortcuts

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