diff --git a/src/ast/builder.h b/src/ast/builder.h index 42efe59e64..a4f4b64488 100644 --- a/src/ast/builder.h +++ b/src/ast/builder.h @@ -300,7 +300,7 @@ class Builder { template TypeConstructorExpression* Construct(ARGS&&... args) { return create( - Source{}, ty.Of(), ExprList(std::forward(args)...)); + ty.Of(), ExprList(std::forward(args)...)); } /// @param type the type to construct @@ -310,7 +310,7 @@ class Builder { template TypeConstructorExpression* Construct(type::Type* type, ARGS&&... args) { return create( - Source{}, type, ExprList(std::forward(args)...)); + type, ExprList(std::forward(args)...)); } /// @param args the arguments for the vector constructor @@ -319,7 +319,7 @@ class Builder { template TypeConstructorExpression* vec2(ARGS&&... args) { return create( - Source{}, ty.vec2(), ExprList(std::forward(args)...)); + ty.vec2(), ExprList(std::forward(args)...)); } /// @param args the arguments for the vector constructor @@ -328,7 +328,7 @@ class Builder { template TypeConstructorExpression* vec3(ARGS&&... args) { return create( - Source{}, ty.vec3(), ExprList(std::forward(args)...)); + ty.vec3(), ExprList(std::forward(args)...)); } /// @param args the arguments for the vector constructor @@ -337,7 +337,7 @@ class Builder { template TypeConstructorExpression* vec4(ARGS&&... args) { return create( - Source{}, ty.vec4(), ExprList(std::forward(args)...)); + ty.vec4(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -346,7 +346,7 @@ class Builder { template TypeConstructorExpression* mat2x2(ARGS&&... args) { return create( - Source{}, ty.mat2x2(), ExprList(std::forward(args)...)); + ty.mat2x2(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -355,7 +355,7 @@ class Builder { template TypeConstructorExpression* mat2x3(ARGS&&... args) { return create( - Source{}, ty.mat2x3(), ExprList(std::forward(args)...)); + ty.mat2x3(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -364,7 +364,7 @@ class Builder { template TypeConstructorExpression* mat2x4(ARGS&&... args) { return create( - Source{}, ty.mat2x4(), ExprList(std::forward(args)...)); + ty.mat2x4(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -373,7 +373,7 @@ class Builder { template TypeConstructorExpression* mat3x2(ARGS&&... args) { return create( - Source{}, ty.mat3x2(), ExprList(std::forward(args)...)); + ty.mat3x2(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -382,7 +382,7 @@ class Builder { template TypeConstructorExpression* mat3x3(ARGS&&... args) { return create( - Source{}, ty.mat3x3(), ExprList(std::forward(args)...)); + ty.mat3x3(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -391,7 +391,7 @@ class Builder { template TypeConstructorExpression* mat3x4(ARGS&&... args) { return create( - Source{}, ty.mat3x4(), ExprList(std::forward(args)...)); + ty.mat3x4(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -400,7 +400,7 @@ class Builder { template TypeConstructorExpression* mat4x2(ARGS&&... args) { return create( - Source{}, ty.mat4x2(), ExprList(std::forward(args)...)); + ty.mat4x2(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -409,7 +409,7 @@ class Builder { template TypeConstructorExpression* mat4x3(ARGS&&... args) { return create( - Source{}, ty.mat4x3(), ExprList(std::forward(args)...)); + ty.mat4x3(), ExprList(std::forward(args)...)); } /// @param args the arguments for the matrix constructor @@ -418,7 +418,7 @@ class Builder { template TypeConstructorExpression* mat4x4(ARGS&&... args) { return create( - Source{}, ty.mat4x4(), ExprList(std::forward(args)...)); + ty.mat4x4(), ExprList(std::forward(args)...)); } /// @param args the arguments for the array constructor @@ -427,7 +427,7 @@ class Builder { template TypeConstructorExpression* array(ARGS&&... args) { return create( - Source{}, ty.array(), ExprList(std::forward(args)...)); + ty.array(), ExprList(std::forward(args)...)); } /// @param subtype the array element type @@ -440,7 +440,7 @@ class Builder { uint32_t n, ARGS&&... args) { return create( - Source{}, ty.array(subtype, n), ExprList(std::forward(args)...)); + ty.array(subtype, n), ExprList(std::forward(args)...)); } /// @param name the variable name @@ -544,8 +544,8 @@ class Builder { /// @returns a `ArrayAccessorExpression` that indexes `arr` with `idx` template Expression* Index(ARR&& arr, IDX&& idx) { - return create( - Source{}, Expr(std::forward(arr)), Expr(std::forward(idx))); + return create(Expr(std::forward(arr)), + Expr(std::forward(idx))); } /// @param obj the object for the member accessor expression @@ -553,8 +553,8 @@ class Builder { /// @returns a `MemberAccessorExpression` that indexes `obj` with `idx` template Expression* Member(OBJ&& obj, IDX&& idx) { - return create( - Source{}, Expr(std::forward(obj)), Expr(std::forward(idx))); + return create(Expr(std::forward(obj)), + Expr(std::forward(idx))); } /// Creates a new Node owned by the Module, with the explicit Source.