Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const ( /* Special Types */ EOF = "EOF" ILLEGAL = "ILLEGAL" /* Identifiers & Literals */ IDENT = "IDENT" /* Delimiters */ COMMA = "COMMA" LBRACE = "LBRACE" RBRACE = "RBRACE" LPAREN = "LPAREN" RPAREN = "RPAREN" ASSIGN = "ASSIGN" SIGN = "SIGN" HASH = "HASH" DOT = "DOT" NEWLINE = "NEWLINE" /* Keywords */ ENTITY = "ENTITY" RELATION = "RELATION" PERMISSION = "PERMISSION" /* Logical */ AND = "AND" OR = "OR" NOT = "NOT" /* Comments */ SINGLE_LINE_COMMENT = "SINGLE_LINE_COMMENT" MULTI_LINE_COMMENT = "MULTI_LINE_COMMENT" /* Whitespace */ SPACE = "SPACE" TAB = "TAB" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PositionInfo ¶ added in v0.3.8
type PositionInfo struct {
	// The current line position in the input source code.
	LinePosition int
	// The current column position in the input source code.
	ColumnPosition int
}
    PositionInfo - represents the current position in the input source code.
type Token ¶
type Token struct {
	// The current position in the input source code.
	PositionInfo PositionInfo
	// The type of the token.
	Type Type
	// The literal value of the token.
	Literal string
}
    Token - represents a lexical token in the input source code.
type Type ¶
type Type string
Type - defines a custom type for tokens.
func LookupKeywords ¶
LookupKeywords - looks up a keyword in the keywords map and returns its corresponding Type.
type WithIgnores ¶ added in v0.3.1
WithIgnores - is a helper struct that includes a token and a list of ignored tokens.
 Click to show internal directories. 
   Click to hide internal directories.