blob: dfe7de4864ab1b5d2136b82c21d133e7e8798039 [file] [log] [blame]
khenaidooab1f7bd2019-11-14 14:00:27 -05001package utilities
2
3// An OpCode is a opcode of compiled path patterns.
4type OpCode int
5
6// These constants are the valid values of OpCode.
7const (
8 // OpNop does nothing
9 OpNop = OpCode(iota)
10 // OpPush pushes a component to stack
11 OpPush
12 // OpLitPush pushes a component to stack if it matches to the literal
13 OpLitPush
14 // OpPushM concatenates the remaining components and pushes it to stack
15 OpPushM
16 // OpConcatN pops N items from stack, concatenates them and pushes it back to stack
17 OpConcatN
18 // OpCapture pops an item and binds it to the variable
19 OpCapture
20 // OpEnd is the least positive invalid opcode.
21 OpEnd
22)