Documentation ¶
Index ¶
- func BuildBinaryOperationAst(src parsetree.BinaryExpression) ast.BinaryOp
- func BuildBlockAst(src parsetree.Block) ast.BlockElement
- func BuildExpressionAst(src parsetree.Expression) ast.Expression
- func BuildLinkAst(src parsetree.Link) ast.Link
- func BuildLiteralAst(src parsetree.Literal) ast.Literal
- func BuildNodeAst(src parsetree.Node) ast.Node
- func BuildScriptAst(src parsetree.Script) ast.Script
- func BuildStatementAst(src parsetree.Statement) ast.Statement
- func BuildUnaryOperationAst(src parsetree.UnaryExpression) ast.UnaryOp
- func ConstantFoldBinaryOperation(node ast.BinaryOp) (foldedNode ast.Expression, isConstExpr bool)
- func ConstantFoldCodeBlock(node ast.CodeBlock) ast.CodeBlock
- func ConstantFoldExpression(node ast.Expression) (foldedNode ast.Expression, isConstExpr bool)
- func ConstantFoldLiteral(node ast.Literal) (foldedNode ast.Literal, isConstExpr bool)
- func ConstantFoldNode(node ast.Node) ast.Node
- func ConstantFoldParagraph(node ast.Paragraph) (foldedNode ast.Paragraph)
- func ConstantFoldScript(node ast.Script) ast.Script
- func ConstantFoldStatement(node ast.Statement) ast.Statement
- func ConstantFoldUnaryOperation(node ast.UnaryOp) (foldedNode ast.Expression, isConstExpr bool)
- func FindNodeNamesInBlock(b ast.BlockElement) []ast.Symbol
- func FindNodeNamesinStatement(s ast.Statement) []ast.Symbol
- func PruneCodeBlock(block ast.CodeBlock) (prunedBlock ast.CodeBlock, endsNode bool)
- func PruneNode(node ast.Node) ast.Node
- func PruneScript(script ast.Script) ast.Script
- func PruneStatement(stmt ast.Statement) (prunedStatement ast.Statement, endsNode bool)
- func PruneUnreachableNodes(nodes []ast.Node) []ast.Node
- type EffectiveType
- func TypeCheckBinary(op ast.BinaryOp) EffectiveType
- func TypeCheckExpression(expr ast.Expression) EffectiveType
- func TypeCheckLiteral(lit ast.Literal) EffectiveType
- func TypeCheckScript(script ast.Script) EffectiveType
- func TypeCheckStatement(stmt ast.Statement, root ast.Script) EffectiveType
- func TypeCheckUnary(op ast.UnaryOp) EffectiveType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBinaryOperationAst ¶
func BuildBinaryOperationAst(src parsetree.BinaryExpression) ast.BinaryOp
func BuildBlockAst ¶
func BuildBlockAst(src parsetree.Block) ast.BlockElement
func BuildExpressionAst ¶
func BuildExpressionAst(src parsetree.Expression) ast.Expression
func BuildUnaryOperationAst ¶
func BuildUnaryOperationAst(src parsetree.UnaryExpression) ast.UnaryOp
func ConstantFoldBinaryOperation ¶
func ConstantFoldBinaryOperation(node ast.BinaryOp) (foldedNode ast.Expression, isConstExpr bool)
func ConstantFoldExpression ¶
func ConstantFoldExpression(node ast.Expression) (foldedNode ast.Expression, isConstExpr bool)
func ConstantFoldLiteral ¶
func ConstantFoldParagraph ¶
func ConstantFoldUnaryOperation ¶
func ConstantFoldUnaryOperation(node ast.UnaryOp) (foldedNode ast.Expression, isConstExpr bool)
func FindNodeNamesInBlock ¶
func FindNodeNamesInBlock(b ast.BlockElement) []ast.Symbol
func PruneCodeBlock ¶
func PruneStatement ¶
Types ¶
type EffectiveType ¶
type EffectiveType int
const ( Error EffectiveType = iota Variant Number Boolean String Null Void )
func TypeCheckBinary ¶
func TypeCheckBinary(op ast.BinaryOp) EffectiveType
func TypeCheckExpression ¶
func TypeCheckExpression(expr ast.Expression) EffectiveType
func TypeCheckLiteral ¶
func TypeCheckLiteral(lit ast.Literal) EffectiveType
func TypeCheckScript ¶
func TypeCheckScript(script ast.Script) EffectiveType
func TypeCheckStatement ¶
func TypeCheckStatement(stmt ast.Statement, root ast.Script) EffectiveType
func TypeCheckUnary ¶
func TypeCheckUnary(op ast.UnaryOp) EffectiveType
Click to show internal directories.
Click to hide internal directories.