gopkg.in/olebedev/go-duktape.v1@v1.0.0-20151008052556-e2ae92f01e4a/conts.go (about)

     1  package duktape
     2  
     3  const (
     4  	CompileEval uint = 1 << iota
     5  	CompileFunction
     6  	CompileStrict
     7  	CompileSafe
     8  	CompileNoResult
     9  	CompileNoSource
    10  	CompileStrlen
    11  )
    12  
    13  const (
    14  	TypeNone Type = iota
    15  	TypeUndefined
    16  	TypeNull
    17  	TypeBoolean
    18  	TypeNumber
    19  	TypeString
    20  	TypeObject
    21  	TypeBuffer
    22  	TypePointer
    23  	TypeLightFunc
    24  )
    25  
    26  const (
    27  	TypeMaskNone uint = 1 << iota
    28  	TypeMaskUndefined
    29  	TypeMaskNull
    30  	TypeMaskBoolean
    31  	TypeMaskNumber
    32  	TypeMaskString
    33  	TypeMaskObject
    34  	TypeMaskBuffer
    35  	TypeMaskPointer
    36  	TypeMaskLightFunc
    37  )
    38  
    39  const (
    40  	EnumIncludeNonenumerable uint = 1 << iota
    41  	EnumIncludeInternal
    42  	EnumOwnPropertiesOnly
    43  	EnumArrayIndicesOnly
    44  	EnumSortArrayIndices
    45  	NoProxyBehavior
    46  )
    47  
    48  const (
    49  	ErrNone int = 0
    50  
    51  	// Internal to Duktape
    52  	ErrUnimplemented int = 50 + iota
    53  	ErrUnsupported
    54  	ErrInternal
    55  	ErrAlloc
    56  	ErrAssertion
    57  	ErrAPI
    58  	ErrUncaughtError
    59  )
    60  
    61  const (
    62  	// Common prototypes
    63  	ErrError int = 100 + iota
    64  	ErrEval
    65  	ErrRange
    66  	ErrReference
    67  	ErrSyntax
    68  	ErrType
    69  	ErrURI
    70  )
    71  
    72  const (
    73  	// Returned error values
    74  	ErrRetUnimplemented int = -(ErrUnimplemented + iota)
    75  	ErrRetUnsupported
    76  	ErrRetInternal
    77  	ErrRetAlloc
    78  	ErrRetAssertion
    79  	ErrRetAPI
    80  	ErrRetUncaughtError
    81  )
    82  
    83  const (
    84  	ErrRetError int = -(ErrError + iota)
    85  	ErrRetEval
    86  	ErrRetRange
    87  	ErrRetReference
    88  	ErrRetSyntax
    89  	ErrRetType
    90  	ErrRetURI
    91  )
    92  
    93  const (
    94  	ExecSuccess = iota
    95  	ExecError
    96  )
    97  
    98  const (
    99  	LogTrace int = iota
   100  	LogDebug
   101  	LogInfo
   102  	LogWarn
   103  	LogError
   104  	LogFatal
   105  )