// scopeVariableStatement scopes a variable statement in the SRG. func (sb *scopeBuilder) scopeVariableStatement(node compilergraph.GraphNode, context scopeContext) proto.ScopeInfo { return sb.scopeDeclaredValue(node, "Variable", requiresInitializer, compilergraph.Predicate(parser.NodeVariableStatementExpression), context) }
// scopeVariable scopes a variable module member in the SRG. func (sb *scopeBuilder) scopeVariable(node compilergraph.GraphNode, context scopeContext) proto.ScopeInfo { return sb.scopeDeclaredValue(node, "Variable", requiresInitializer, compilergraph.Predicate(parser.NodePredicateTypeFieldDefaultValue), context) }
// Connect connects an IRG AST node to another IRG AST node. func (ast *irgASTNode) Connect(predicate string, other parser.AstNode) parser.AstNode { ast.graphNode.Connect(compilergraph.Predicate(predicate), other.(*irgASTNode).graphNode) return ast }
// DecorateWith decorates an IRG AST node with the given int value. func (ast *irgASTNode) DecorateWithInt(predicate string, value int) parser.AstNode { ast.graphNode.DecorateWith(compilergraph.Predicate(predicate), value) return ast }
// Decorate decorates an SRG AST node with the given value. func (ast *srgASTNode) Decorate(predicate string, value string) parser.AstNode { ast.graphNode.Decorate(compilergraph.Predicate(predicate), value) return ast }