parser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: MIT Imports: 6 Imported by: 117

Documentation

Index

Constants

View Source
const (
	IMPORTANT_SUFFIX_REGEXP = `(?i)\s*!important\s*$`
)

Variables

This section is empty.

Functions

func Parse

func Parse(text string) (*css.Stylesheet, error)

Parse a whole stylesheet

func ParseDeclarations

func ParseDeclarations(text string) ([]*css.Declaration, error)

Parse CSS declarations

Types

type Parser

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

func NewParser

func NewParser(txt string) *Parser

Instanciate a new parser

func (*Parser) ParseDeclaration

func (parser *Parser) ParseDeclaration() (*css.Declaration, error)

Parse a declaration

func (*Parser) ParseDeclarations

func (parser *Parser) ParseDeclarations() ([]*css.Declaration, error)

Parse a list of declarations

func (*Parser) ParseRule

func (parser *Parser) ParseRule() (*css.Rule, error)

Parse a rule

func (*Parser) ParseRules

func (parser *Parser) ParseRules() ([]*css.Rule, error)

Parse a list of rules

func (*Parser) ParseStylesheet

func (parser *Parser) ParseStylesheet() (*css.Stylesheet, error)

Parse a stylesheet

Jump to

Keyboard shortcuts

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