-
Notifications
You must be signed in to change notification settings - Fork 10
/
vars.go
54 lines (44 loc) · 1.5 KB
/
vars.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright 2012-2018, Rolf Veen and contributors.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ogdl
import "errors"
const (
trueStr = "true"
falseStr = "false"
)
// Nodes containing these strings are special
const (
TypeExpression = "!e"
TypePath = "!p"
TypeVariable = "!v"
TypeSelector = "!s"
TypeIndex = "!i"
TypeGroup = "!g"
TypeArguments = "!a"
TypeTemplate = "!t"
TypeString = "!string"
TypeIf = "!if"
TypeEnd = "!end"
TypeElse = "!else"
TypeElseIf = "!elseif"
TypeFor = "!for"
TypeBreak = "!break"
)
var (
// ErrInvalidUnread reports an unsuccessful UnreadByte or UnreadRune
ErrInvalidUnread = errors.New("invalid use of UnreadByte or UnreadRune")
// ErrEOS indicates the end of the stream
ErrEOS = errors.New("EOS")
// ErrSpaceNotUniform indicates mixed use of spaces and tabs for indentation
ErrSpaceNotUniform = errors.New("space has both tabs and spaces")
// ErrUnterminatedQuotedString is obvious.
ErrUnterminatedQuotedString = errors.New("quoted string not terminated")
ErrNotANumber = errors.New("not a number")
ErrNotFound = errors.New("not found")
ErrIncompatibleType = errors.New("incompatible type")
ErrNilReceiver = errors.New("nil function receiver")
ErrInvalidIndex = errors.New("invalid index")
ErrFunctionNoGraph = errors.New("functions doesn't return *Graph")
ErrInvalidArgs = errors.New("invalid arguments or nil receiver")
)