Documentation ¶
Index ¶
Constants ¶
View Source
const ( LOWEST int NORMAL ASSIGN LOGIC RANGE EQUALS COMPARE SUM PRODUCT PREFIX INDEX CALL )
Constants for denoting precedence
View Source
const ( // EndOfFileError represents normal EOF error EndOfFileError int // WrongTokenError means that token is not what we expected WrongTokenError // UnexpectedTokenError means that token is not expected to appear in current condition UnexpectedTokenError // UnexpectedEndError means we get unexpected "end" keyword (this is mainly created for REPL) UnexpectedEndError // MethodDefinitionError means there's an error on method definition's method name MethodDefinitionError // InvalidAssignmentError means user assigns value to wrong type of expressions InvalidAssignmentError // SyntaxError means there's a grammatical in the source code SyntaxError )
View Source
const ( NormalMode int = iota REPLMode TestMode )
These are the enums for marking parser's mode, which decides whether it should pop unused values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // Message contains the readable message of error Message string // contains filtered or unexported fields }
Error represents parser's parsing error
func (*Error) IsUnexpectedEnd ¶
IsUnexpectedEnd checks if error is unexpected "end" keyword error
Click to show internal directories.
Click to hide internal directories.