Documentation
¶
Overview ¶
Package evaluator defines logic to evaluate an AST.
Index ¶
Constants ¶
View Source
const (
// ErrMsgCouldNotEvaluateForStatement occurs when a for statement cannot be evaluated.
ErrMsgCouldNotEvaluateForStatement = "could not evaluate for statement: %s"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constant ¶
Constant defines a constant struct.
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator defines the actual evaluator struct.
func NewEvaluator ¶
NewEvaluator creates a new evaluator.
func (*Evaluator) AddToBuffer ¶ added in v0.1.1
AddToBuffer adds data to the buffer.
func (*Evaluator) Evaluate ¶
func (e *Evaluator) Evaluate( currentAst ast.ExprNode, ) (*controlflow.EvaluationResult, error)
Evaluate runs the evaluation logic.
func (*Evaluator) SetCurrentFilePath ¶ added in v0.1.1
SetCurrentFilePath sets the current file path for import resolution.
type ScopedValue ¶
ScopedValue defines an interface for scoped values.
Source Files
¶
- add_to_buffer.go
- assign_variable.go
- constant.go
- evaluate.go
- evaluate_any_literal.go
- evaluate_array_concatenation.go
- evaluate_array_literal.go
- evaluate_assignment_statement.go
- evaluate_binary_expr.go
- evaluate_block_statement.go
- evaluate_bool_literal.go
- evaluate_break_statement.go
- evaluate_comparison_binary_expr.go
- evaluate_constant_declaration.go
- evaluate_continue_statement.go
- evaluate_equality_binary_expr.go
- evaluate_for_statement.go
- evaluate_function_call.go
- evaluate_function_declaration.go
- evaluate_identifier.go
- evaluate_if_statement.go
- evaluate_import_statement.go
- evaluate_index_assignment_statement.go
- evaluate_index_expr.go
- evaluate_logical_binary_expr.go
- evaluate_null_literal.go
- evaluate_number_literal.go
- evaluate_prefix_expr.go
- evaluate_return_statement.go
- evaluate_shorthand_assignment_expr.go
- evaluate_spread_expr.go
- evaluate_statement_list.go
- evaluate_string_literal.go
- evaluate_variable_declaration.go
- evaluator.go
- get_full_function_name.go
- identifier_registry.go
- scoped_value.go
- terminate.go
- variable.go
Click to show internal directories.
Click to hide internal directories.