corgi

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package corgi provides parsing for corgi files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseHelper

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

func File

func File(source, name string, contents string) *ParseHelper

File creates a new *ParseHelper for a file from the given source and name, with the passed contents.

func (*ParseHelper) Parse

func (h *ParseHelper) Parse() (*file.File, error)

Parse parses the file, minifies it, and then links it.

func (*ParseHelper) WithFileType

func (h *ParseHelper) WithFileType(t file.Type) *ParseHelper

WithFileType sets the file type of the file.

It returns the ParseHelper itself to allow chaining.

func (*ParseHelper) WithResourceSource

func (h *ParseHelper) WithResourceSource(src resource.Source) *ParseHelper

WithResourceSource adds the given resource.Source to the ParseHelper.

It returns the ParseHelper itself to allow chaining.

Directories

Path Synopsis
Package file provides structs that represent the structure of a corgi file.
Package file provides structs that represent the structure of a corgi file.
minify
Package minify implements a utility to reduce the number of items in the file.
Package minify implements a utility to reduce the number of items in the file.
Package lex provides the lexer for corgi.
Package lex provides the lexer for corgi.
Package link links implements a linker for corgi files.
Package link links implements a linker for corgi files.
element
Package element provides checkers to check correct usage of &s and self-closing elements.
Package element provides checkers to check correct usage of &s and self-closing elements.
imports
Package imports provides a resolver for imports.
Package imports provides a resolver for imports.
mixin
Package mixin provides a Checker, a CallChecker, and CallLinker for mixins.
Package mixin provides a Checker, a CallChecker, and CallLinker for mixins.
use
Package use provides a NamespaceChecker that checks for namespace collisions in use directives.
Package use provides a NamespaceChecker that checks for namespace collisions in use directives.
Package parse implements a parser for corgi files.
Package parse implements a parser for corgi files.
Package resource provides abstractions for accessing resources.
Package resource provides abstractions for accessing resources.

Jump to

Keyboard shortcuts

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