sema

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sema performs semantic checking of OpenGL ES Shading Language programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(program interface{}, evaluator Evaluator) (err []error)

Analyze is the main entry point of the package. It performs a semantic check of a GLES Shading Language program. Its arguments are the AST representation of the program, and a constant expression evaluating function. This function is used for evaluating array size expressions and the values of constant variables. An implementation of such a function can be found in the evaluator package.

The Analyze function is a work in progress. Currently it just computes the types of all the expressions and evaluates all constant expressions.

Types

type Evaluator

type Evaluator func(expr ast.Expression, resolver func(symbol ast.ValueSymbol) ast.Value, lang ast.Language) (val ast.Value, err []error)

Evaluator is the type of the function used for evaluating constant expressions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL