Documentation
¶
Overview ¶
Copyright 2025 The Hulo Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright 2025 The Hulo Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright 2025 The Hulo Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright 2025 The Hulo Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright 2025 The Hulo Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright 2025 The Hulo Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright 2025 The Hulo Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Index ¶
- Constants
- type BashOptions
- type BatchOptions
- type CompilerOptions
- type DebugSettingsAnalyzer
- type DebugSettingsLexer
- type DebugSettingsParser
- type DebugSettingsToken
- type DebugSettingsTranspiler
- type Dependency
- type HuloPkg
- type HuloPkgLock
- type HuloRC
- type HuloRepl
- type Huloc
- type Network
- type ParserOptions
- type PromptTheme
- type Registry
- type VBScriptOptions
Constants ¶
const ( L_BASH = "bash" L_BATCH = "batch" L_VBSCRIPT = "vbs" )
const HuloPkgFileName = "hulo.pkg.yaml"
const HuloPkgLockFileName = "hulo.pkg.lock.yaml"
const HuloRCFileName = "hulorc.yaml"
const HuloReplFileName = "hulo-repl.yaml"
const HuloReplTemplate = `` /* 243-byte string literal not displayed */
const HulocFileName = "huloc.yaml"
HulocFileName is the default configuration file name.
const PromptThemeTemplate = `` /* 483-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BashOptions ¶
type BashOptions struct { MultiString string `yaml:"multi_string"` BooleanFormat string `yaml:"boolean_format" validate:"oneof=number string command"` }
BashOptions is the configuration for the Bash compiler.
type BatchOptions ¶
type BatchOptions struct {
CommentSyntax string `yaml:"comment_syntax" validate:"oneof=rem double_colon"`
}
BatchOptions is the configuration for the Batch compiler.
type CompilerOptions ¶
type CompilerOptions struct { Bash *BashOptions `yaml:"bash"` Batch *BatchOptions `yaml:"batch"` VBScript *VBScriptOptions `yaml:"vbs"` }
CompilerOptions is the configuration for the compiler.
type DebugSettingsAnalyzer ¶ added in v0.2.0
type DebugSettingsLexer ¶ added in v0.2.0
type DebugSettingsParser ¶ added in v0.2.0
type DebugSettingsToken ¶ added in v0.2.0
type DebugSettingsTranspiler ¶ added in v0.2.0
type Dependency ¶ added in v0.2.0
type Dependency struct { Version string `yaml:"version"` Resolved string `yaml:"resolved"` Commit string `yaml:"commit"` Dependencies []Dependency `yaml:"dependencies"` Dev bool `yaml:"dev"` }
type HuloPkg ¶ added in v0.2.0
type HuloPkg struct { Name string `yaml:"name"` Version string `yaml:"version"` Description string `yaml:"description"` Author string `yaml:"author"` License string `yaml:"license"` Repository string `yaml:"repository"` Homepage string `yaml:"homepage"` Keywords []string `yaml:"keywords"` Scripts map[string]string `yaml:"scripts"` Dependencies map[string]string `yaml:"dependencies"` Main string `yaml:"main"` }
func NewHuloPkg ¶ added in v0.2.0
func NewHuloPkg() *HuloPkg
type HuloPkgLock ¶ added in v0.2.0
type HuloPkgLock struct {
Dependencies []Dependency `yaml:"dependencies"`
}
type HuloRepl ¶ added in v0.2.0
type HuloRepl struct { Theme string `yaml:"theme" validate:"oneof=default dark light colorful custom"` ThemeFiles map[string]string `yaml:"theme_files"` HistoryFile string `yaml:"history_file"` DevelopmentMode bool `yaml:"development_mode"` DebugLevel string `yaml:"debug_level" validate:"oneof=debug info warn error"` Keybindings map[string]string `yaml:"keybindings"` MaxSuggestions uint16 `yaml:"max_suggestions" validate:"required,min=1,max=100"` Parser DebugSettingsParser `yaml:"parser" validate:"required"` Transpiler DebugSettingsTranspiler `yaml:"transpiler" validate:"required"` Analyzer DebugSettingsAnalyzer `yaml:"analyzer" validate:"required"` Lexer DebugSettingsLexer `yaml:"lexer" validate:"required"` Token DebugSettingsToken `yaml:"token" validate:"required"` Target string `yaml:"target" validate:"required,oneof=bash batch vbs"` }
type Huloc ¶
type Huloc struct { CompilerOptions CompilerOptions `yaml:"compiler_options"` Main string `yaml:"main" validate:"required,endswith=.hl"` Include []string `yaml:"include"` Exclude []string `yaml:"exclude"` HuloPath string `yaml:"hulopath"` // EnableMangle is the option to enable variable name mangling. // If true, the variable name will be mangled to a random string, like `_scope_0_1`. // If false, the variable name will be used as is. EnableMangle bool `yaml:"enable_mangle"` Parser ParserOptions `yaml:"parser_options"` // OutDir is the output directory. OutDir string `yaml:"out_dir"` // Targets is the targets to compile. Targets []string `yaml:"targets"` }
Huloc is the configuration for the Hulo compiler.
type ParserOptions ¶ added in v0.2.0
type ParserOptions struct { // ShowASTTree is the option to show the AST tree. // If the value is "stdout", the AST tree will be shown to the standard output. // If the value is "file", the AST tree will be shown to the file. // If the value is "none", the AST tree will not be shown. ShowASTTree string `yaml:"show_ast_tree"` // EnableTracer is the option to enable the tracer. EnableTracer bool `yaml:"enable_tracer"` // DisableTiming is the option to disable the timing. DisableTiming bool `yaml:"disable_timing"` // WatchNode is the option to watch the node. WatchNode []string `yaml:"watch_node"` }
ParserOptions is the options for the parser.
type PromptTheme ¶ added in v0.2.0
type PromptTheme struct { PrefixTextColor string `yaml:"prefix_text_color"` PrefixBGColor string `yaml:"prefix_bg_color"` InputTextColor string `yaml:"input_text_color"` InputBGColor string `yaml:"input_bg_color"` PreviewSuggestionTextColor string `yaml:"preview_suggestion_text_color"` PreviewSuggestionBGColor string `yaml:"preview_suggestion_bg_color"` SuggestionTextColor string `yaml:"suggestion_text_color"` SuggestionBGColor string `yaml:"suggestion_bg_color"` SelectedSuggestionTextColor string `yaml:"selected_suggestion_text_color"` SelectedSuggestionBGColor string `yaml:"selected_suggestion_bg_color"` DescriptionTextColor string `yaml:"description_text_color"` DescriptionBGColor string `yaml:"description_bg_color"` SelectedDescriptionTextColor string `yaml:"selected_description_text_color"` SelectedDescriptionBGColor string `yaml:"selected_description_bg_color"` ScrollbarThumbColor string `yaml:"scrollbar_thumb_color"` ScrollbarBGColor string `yaml:"scrollbar_bg_color"` }
type VBScriptOptions ¶
type VBScriptOptions struct {
CommentSyntax string `yaml:"comment_syntax" validate:"oneof=rem single_quote"`
}
VBScriptOptions is the configuration for the VBScript compiler.