Uses of Class
net.hydromatic.morel.ast.AstNode
-
Packages that use AstNode Package Description net.hydromatic.morel Standard ML interpreter, implemented in Java.net.hydromatic.morel.ast Abstract syntax tree.net.hydromatic.morel.compile Validates programs (represented asAstNode), deduces their type, and compiles them into code that can be evaluated. -
-
Uses of AstNode in net.hydromatic.morel
Methods in net.hydromatic.morel with parameters of type AstNode Modifier and Type Method Description (package private) voidMain.SubShell. command(AstNode statement, Consumer<String> outLines) -
Uses of AstNode in net.hydromatic.morel.ast
Subclasses of AstNode in net.hydromatic.morel.ast Modifier and Type Class Description static classAst.AggregateCall to an aggregate function in acomputeclause.static classAst.AnnotatedExpParse tree node of an expression annotated with a type.static classAst.AnnotatedPatPattern that is a pattern annotated with a type.static classAst.ApplyApplication of a function to its argument.static classAst.AsPatLayered pattern.static classAst.CaseCase expression.static classAst.CompositeTypeNot really a type, just a way for the parser to represent the type arguments to a type constructor.static classAst.ComputeAcomputeclause in afromexpression.static classAst.Con0PatType constructor pattern with no argument.static classAst.ConPatType constructor pattern with an argument.static classAst.DatatypeBindParse tree node of a datatype binding.static classAst.DatatypeDeclParse tree node of a datatype declaration.static classAst.DeclBase class for declarations.static classAst.ExpBase class of expression ASTs.static classAst.FnLambda expression.static classAst.FromFrom expression.static classAst.FromStepA step in afromexpression -where,groupororder.static classAst.FunBindOne of the branches (separated by 'and') in a 'fun' function declaration.static classAst.FunctionTypeFunction type.static classAst.FunDeclParse tree node of a function declaration.static classAst.FunMatchOne of the branches (separated by '|') in a 'fun' function declaration.static classAst.GroupAgroupclause in afromexpression.static classAst.IdParse tree node of an identifier.static classAst.IdPatNamed pattern, the pattern analog of theAst.Idexpression.static classAst.If"If ...static classAst.InfixCallCall to an infix operator.static classAst.InfixPatPattern build from an infix operator applied to two patterns.static classAst.Let"Let" expression.static classAst.ListExpList expression.static classAst.ListPatList pattern, the pattern analog of theAst.ListExpexpression.static classAst.LiteralParse tree node of a literal (constant).static classAst.LiteralPatLiteral pattern, the pattern analog of theAst.Literalexpression.static classAst.MatchMatch.static classAst.NamedTypeParse tree for a named type (e.g.static classAst.OrderAnorderclause in afromexpression.static classAst.OrderItemAn item in anorderclause.static classAst.PatBase class for a pattern.static classAst.PrefixCallCall to a prefix operator.static classAst.RecordRecord.static classAst.RecordPatRecord pattern.static classAst.RecordSelectorParse tree node of a record selector.static classAst.RecordTypeParse tree node of a record type.static classAst.ScanA scan (e.g.static classAst.TupleTuple.static classAst.TuplePatTuple pattern, the pattern analog of theAst.Tupleexpression.static classAst.TupleTypeTuple type.static classAst.TyConType constructor.static classAst.TypeBase class for parse tree nodes that represent types.static classAst.TyVarParse tree node of a type variable.static classAst.ValBindValue bind.static classAst.ValDeclParse tree node of a value declaration.static classAst.WhereAwhereclause in afromexpression.static classAst.WildcardPatWildcard pattern.static classAst.YieldAyieldclause in afromexpression.static classCore.AggregateCall to an aggregate function in acomputeclause.static classCore.ApplyApplication of a function to its argument.static classCore.AsPatLayered pattern.(package private) static classCore.BaseNodeAbstract base class of Core nodes.static classCore.CaseCase expression.static classCore.Con0PatType constructor pattern with no argument.static classCore.ConPatType constructor pattern with an argument.static classCore.DatatypeDeclDatatype declaration.static classCore.DeclBase class for declarations.static classCore.ExpBase class of core expressions.static classCore.FnLambda expression.static classCore.FromFrom expression.static classCore.FromStepA step in afromexpression -where,groupororder.static classCore.GroupAgroupclause in afromexpression.static classCore.IdReference to a variable.static classCore.IdPatNamed pattern.static classCore.Let"Let" expression.static classCore.ListPatList pattern.static classCore.LiteralCode of a literal (constant).static classCore.LiteralPatLiteral pattern, the pattern analog of theCore.Literalexpression.static classCore.Local"Local" expression.static classCore.MatchMatch.static classCore.NamedPatBase class for named patterns (Core.IdPatandCore.AsPat).static classCore.NonRecValDeclNon-recursive value declaration.static classCore.OrderAnorderclause in afromexpression.static classCore.OrderItemAn item in anorderclause.static classCore.PatBase class for a pattern.static classCore.RecordPatRecord pattern.static classCore.RecordSelectorRecord selector function.static classCore.RecValDeclRecursive value declaration.static classCore.ScanAjoinorv in listExprorv = exprclause in afromexpression.static classCore.TupleTuple expression.static classCore.TuplePatTuple pattern, the pattern analog of theCore.Tupleexpression.static classCore.ValDeclAbstract (recursive or non-recursive) value declaration.static classCore.WhereAwhereclause in afromexpression.static classCore.WildcardPatWildcard pattern.static classCore.YieldStep that computes an expression.Methods in net.hydromatic.morel.ast with type parameters of type AstNode Modifier and Type Method Description protected <E extends AstNode>
voidVisitor. accept(E e)For use as a method reference.protected <E extends AstNode>
List<E>Shuttle. visitList(List<E> nodes)protected <K,E extends AstNode>
Map<K,E>Shuttle. visitMap(Map<K,E> nodes)protected <K,E extends AstNode>
SortedMap<K,E>Shuttle. visitSortedMap(SortedMap<K,E> nodes)Methods in net.hydromatic.morel.ast that return AstNode Modifier and Type Method Description AstNodeAst.Aggregate. accept(Shuttle shuttle)AstNodeAst.Compute. accept(Shuttle shuttle)AstNodeAst.Group. accept(Shuttle shuttle)AstNodeAst.Order. accept(Shuttle shuttle)AstNodeAst.OrderItem. accept(Shuttle shuttle)AstNodeAst.TyCon. accept(Shuttle shuttle)AstNodeAst.ValBind. accept(Shuttle shuttle)AstNodeAst.Where. accept(Shuttle shuttle)AstNodeAst.Yield. accept(Shuttle shuttle)abstract AstNodeAstNode. accept(Shuttle shuttle)Accepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.AstNodeCore.BaseNode. accept(Shuttle shuttle)AstNodeCore.OrderItem. accept(Shuttle shuttle)protected AstNodeShuttle. visit(Ast.Aggregate aggregate)protected AstNodeShuttle. visit(Ast.Compute compute)protected AstNodeShuttle. visit(Ast.Group group)protected AstNodeShuttle. visit(Ast.Order order)protected AstNodeShuttle. visit(Ast.OrderItem orderItem)protected AstNodeShuttle. visit(Ast.TyCon tyCon)protected AstNodeShuttle. visit(Ast.Where where)protected AstNodeShuttle. visit(Ast.Yield yield)Methods in net.hydromatic.morel.ast with parameters of type AstNode Modifier and Type Method Description AstWriterAstWriter. append(AstNode node, int left, int right)Appends a parse tree node.AstWriterAstWriter. binary(String left, AstNode a0, String mid, AstNode a1, int right)Appends a call to a binary operator (e.g.AstWriterAstWriter. binary(String left, AstNode a0, String mid, AstNode a1, String right)Appends a call to a binary operator (e.g.AstWriterAstWriter. infix(int left, AstNode a0, Op op, AstNode a1, int right)Appends a call to an infix operator.AstWriterAstWriter. prefix(int left, Op op, AstNode a, int right)Appends a call to an prefix operator.Method parameters in net.hydromatic.morel.ast with type arguments of type AstNode Modifier and Type Method Description AstWriterAstWriter. appendAll(Iterable<? extends AstNode> nodes, int left, Op op, int right)Appends a list of parse tree nodes.AstWriterAstWriter. appendAll(Iterable<? extends AstNode> list, String sep)Appends a list of parse tree nodes separated bysep.AstWriterAstWriter. appendAll(Iterable<? extends AstNode> list, String start, String sep, String end)Appends a list of parse tree nodes separated bysep, and also with prefix and suffix:start node0 sep node1 ... sep nodeN end.AstWriterAstWriter. appendAll(Iterable<? extends AstNode> list, String start, String sep, String end, String empty)Appends a list of parse tree nodes separated bysep, and also with prefix and suffix:start node0 sep node1 ... sep nodeN end.PosPos. plusAll(List<? extends AstNode> nodes)static PosPos. sum(List<? extends AstNode> nodes) -
Uses of AstNode in net.hydromatic.morel.compile
Fields in net.hydromatic.morel.compile with type parameters of type AstNode Modifier and Type Field Description private Map<AstNode,Unifier.Term>TypeResolver. mapprivate Map<AstNode,Unifier.Term>TypeMap. nodeTypeTermsMethods in net.hydromatic.morel.compile with type parameters of type AstNode Modifier and Type Method Description private <E extends AstNode>
ETypeResolver. reg(E node, Unifier.Variable variable, Unifier.Term term)Methods in net.hydromatic.morel.compile that return AstNode Modifier and Type Method Description private AstNodeTypeResolver. deduceValBindType(TypeResolver.TypeEnv env, Ast.ValBind valBind, Map<Ast.IdPat,Unifier.Term> termMap, Unifier.Variable v, Unifier.Variable vPat)Methods in net.hydromatic.morel.compile with parameters of type AstNode Modifier and Type Method Description static Analyzer.AnalysisAnalyzer. analyze(TypeSystem typeSystem, Environment env, AstNode node)Analyzes an expression.private Set<String>CalciteCompiler. getRelationalVariables(Environment env, Set<String> nameSet, AstNode node)TypeTypeMap. getType(AstNode node)Returns the type of an AST node.TypeTypeMap. getTypeOpt(AstNode node)Returns the type of an AST node, or null if no type is known.booleanTypeMap. hasType(AstNode node)Returns whether an AST node has a type.static CompiledStatementCompiles. prepareStatement(TypeSystem typeSystem, Session session, Environment env, AstNode statement, @Nullable Calcite calcite, Consumer<CompileException> warningConsumer, Tracer tracer)Validates and compiles a statement (expression or declaration), and compiles it to code that can be evaluated by the interpreter.static Ast.DeclCompiles. toDecl(AstNode statement)Converts an expression or declaration to a declaration.static Ast.ValDeclCompiles. toValDecl(AstNode statement)Converts an expression or value declaration to a value declaration.booleanTypeMap. typeIsVariable(AstNode node)Returns whether the type of an AST node will be a type variable.static TypeResolver.ResolvedCompiles. validateExpression(AstNode statement, Map<String,ForeignValue> valueMap)Validates an expression or declaration, deducing its type and perhaps rewriting the expression to a form that can more easily be compiled.Constructor parameters in net.hydromatic.morel.compile with type arguments of type AstNode Constructor Description TypeMap(TypeSystem typeSystem, Map<AstNode,Unifier.Term> nodeTypeTerms, Unifier.Substitution substitution)
-