ast

package
v0.0.0-...-8229079 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2016 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsignStmt

type AsignStmt struct {
	Left  []Node
	Equal Node // =
	Right []Node
}

type Context

type Context struct {
	Head        Node
	Templates   []Node
	Assignments []AsignStmt
	Objects     []Object
}

type File

type File struct {
	Comments    []Node
	Contextx    []Context
	Assignments []AsignStmt
	Objects     []Object
	Templates   []Template
}

type Node

type Node interface {
	Begin() int
	End() int
	Text() string
}

type Object

type Object struct {
	Left   []Node
	Assign Node // =>
	Right  []Node
}

type Template

type Template Context

type Token

type Token struct {
	Type   TokenType
	Text   string
	Line   int
	Column int
	Begin  int
	End    int
}

Token is the identifier for a chunk of text.

type TokenType

type TokenType int

TokenType is the type of tokem that will be returned by the Scanner.

const (
	EOF TokenType = iota
	Comment
	Section
	WhiteSpace
	NLine
	Ident
	Assign   // =
	LBrace   // [
	RBrace   // ]
	LBracket // )
	RBracket // (
	Exclam   // !
)

The following are the token types that are recognized by the scanner

Jump to

Keyboard shortcuts

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