Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBlockSize = 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
func (*Lexer) GetTokenValue ¶
GetTokenValue returns the []rune of the token source code
type Token ¶
type Token struct { Type TokenType `json:"TokenType"` Offset int `json:"Offset"` Length int `json:"Length"` }
type TokenType ¶
type TokenType uint8
const ( // Misc Undefined TokenType = iota Unknown EndOfFile Abstract Array As Break Callable Case Catch Class ClassConstant Clone Const Continue Declare Default Do Echo Else ElseIf Empty EndDeclare EndFor EndForeach EndIf EndSwitch EndWhile EndHeredoc Eval Exit Extends Final Finally For ForEach Function Fn Global Goto HaltCompiler If Implements Include IncludeOnce InstanceOf InsteadOf Interface Isset List And Or Xor Namespace New Print Private Public Protected Require RequireOnce Return Static Switch Throw Trait Try Unset Use Var While Yield YieldFrom //keyword magic constants DirectoryConstant FileConstant LineConstant FunctionConstant MethodConstant NamespaceConstant TraitConstant //literals StringLiteral FloatingLiteral EncapsulatedAndWhitespace Text IntegerLiteral //Names Name VariableName //Operators and Punctuation Equals Tilde Colon Semicolon Exclamation Dollar ForwardSlash Percent Comma AtSymbol Backtick Question DoubleQuote SingleQuote LessThan GreaterThan Asterisk AmpersandAmpersand Ampersand AmpersandEquals CaretEquals LessThanLessThan LessThanLessThanEquals GreaterThanGreaterThan GreaterThanGreaterThanEquals BarEquals Plus PlusEquals AsteriskAsterisk AsteriskAsteriskEquals Arrow OpenBrace OpenBracket OpenParenthesis CloseBrace CloseBracket CloseParenthesis QuestionQuestion Bar BarBar Caret Dot DotEquals CurlyOpen MinusMinus ForwardslashEquals DollarCurlyOpen FatArrow ColonColon Ellipsis PlusPlus EqualsEquals GreaterThanEquals EqualsEqualsEquals ExclamationEquals ExclamationEqualsEquals LessThanEquals Spaceship Minus MinusEquals PercentEquals AsteriskEquals Backslash BooleanCast UnsetCast StringCast ObjectCast IntegerCast FloatCast StartHeredoc ArrayCast OpenTag OpenTagEcho CloseTag DocumentCommentStart DocumentCommentVersion DocumentCommentText DocumentCommentUnknown DocumentCommentStartline DocumentCommentEndline DocumentCommentTagName DocumentCommentTagNameAnchorStart // Anchor for conveniently detecting tags AtAuthor AtDeprecated AtGlobal AtLicense AtLink AtMethod AtParam AtProperty AtPropertyRead AtPropertyWrite AtReturn AtSince AtThrows AtVar DocumentCommentTagNameAnchorEnd DocumentCommentEnd //Comments whitespace Comment Whitespace )
func (*TokenType) MarshalJSON ¶
MarshalJSON marshals the token type into JSON
Click to show internal directories.
Click to hide internal directories.