Search in sources :

Example 11 with VarDecE

use of ast.Ast.VarDecE in project L42 by ElvisResearchGroup.

the class Desugar method getBlock.

static RoundBlock getBlock(Position p, Expression xe, Expression inner) {
    List<Expression.BlockContent> bc = new ArrayList<>();
    List<VarDec> decs = new ArrayList<VarDec>();
    decs.add(new VarDecE(xe));
    bc.add(new Expression.BlockContent(decs, Collections.emptyList()));
    return new RoundBlock(p, Doc.empty(), inner, bc);
}
Also used : Expression(ast.Expression) VarDec(ast.Ast.VarDec) ArrayList(java.util.ArrayList) RoundBlock(ast.Expression.RoundBlock) VarDecE(ast.Ast.VarDecE)

Example 12 with VarDecE

use of ast.Ast.VarDecE in project L42 by ElvisResearchGroup.

the class Desugar method getBlockContent.

public static Expression.BlockContent getBlockContent(Expression e) {
    List<VarDec> single = new ArrayList<VarDec>();
    single.add(new VarDecE(e));
    return new Expression.BlockContent(single, Collections.emptyList());
}
Also used : VarDec(ast.Ast.VarDec) ArrayList(java.util.ArrayList) VarDecE(ast.Ast.VarDecE)

Aggregations

VarDecE (ast.Ast.VarDecE)12 VarDec (ast.Ast.VarDec)10 ArrayList (java.util.ArrayList)10 Expression (ast.Expression)9 RoundBlock (ast.Expression.RoundBlock)5 X (ast.Expression.X)5 VarDecXE (ast.Ast.VarDecXE)4 MethodSelectorX (ast.Ast.MethodSelectorX)3 Parameters (ast.Ast.Parameters)3 Catch (ast.Expression.Catch)2 BlockContent (ast.Expression.BlockContent)1 CurlyBlock (ast.Expression.CurlyBlock)1 Signal (ast.Expression.Signal)1 SquareCall (ast.Expression.SquareCall)1 With (ast.Expression.With)1 On (ast.Expression.With.On)1