package tokens
import "github.com/open-policy-agent/opa/ast/internal/tokens"
Index ¶
Types ¶
type Token ¶
type Token int
Token represents a single Rego source code token for use by the Parser.
const ( Illegal Token = iota EOF Whitespace Ident Comment Package Import As Default Else Not Some With Null True False Number String LBrack RBrack LBrace RBrace LParen RParen Comma Colon Add Sub Mul Quo Rem And Or Unify Equal Assign Neq Gt Lt Gte Lte Dot Semicolon )
All tokens must be defined here
func Keyword ¶
Keyword will return a token for the passed in literal value. If the value is a Rego keyword then the appropriate token is returned. Everything else is an Ident.
func (Token) String ¶
Source Files ¶
- Version
- v0.33.0
- Published
- Sep 30, 2021
- Platform
- linux/amd64
- Last checked
- 1 hour ago –
Tools for package owners.