From 6fd8929650749e116bd2540f2d42d2db0b249465 Mon Sep 17 00:00:00 2001 From: Regina Reynolds Date: Wed, 4 Oct 2023 21:18:27 -0400 Subject: [PATCH 1/3] Update object.bal Move RawTemplate object from raw_template.bal to object.bal --- langlib/lang.object/src/main/ballerina/object.bal | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/langlib/lang.object/src/main/ballerina/object.bal b/langlib/lang.object/src/main/ballerina/object.bal index 8079cb8e9028..f662960441bd 100644 --- a/langlib/lang.object/src/main/ballerina/object.bal +++ b/langlib/lang.object/src/main/ballerina/object.bal @@ -25,4 +25,17 @@ public type Iterable distinct object { public function iterator() returns object { public function next() returns record {| any|error value; |}|error?; }; +} + +# Distinct RawTemplate type. +# A raw template expression constructs an object belonging to this type. +public type RawTemplate distinct object { + # An array of the strings containing the characters in BacktickString + # outside of interpolations, split at the interpolation points. + # The length of this array is one greater than + # the length of the `insertions` array. + public (readonly & string[]) strings; + # An array containing the results of evaluating the + # interpolations in the BacktickString. + public (any|error)[] insertions; }; From a4cb0514d46127ae5c057f6cfef30b6e78d02aa4 Mon Sep 17 00:00:00 2001 From: Regina Reynolds Date: Wed, 4 Oct 2023 21:19:39 -0400 Subject: [PATCH 2/3] Remove raw_template.bal file --- .../src/main/ballerina/raw_template.bal | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 langlib/lang.object/src/main/ballerina/raw_template.bal diff --git a/langlib/lang.object/src/main/ballerina/raw_template.bal b/langlib/lang.object/src/main/ballerina/raw_template.bal deleted file mode 100644 index bed0d4bf30ab..000000000000 --- a/langlib/lang.object/src/main/ballerina/raw_template.bal +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2020 WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 Inc. licenses this file to you under the Apache License, -// Version 2.0 (the "License"); you may not use this file except -// in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - - -# Distinct RawTemplate type. -# A raw template expression constructs an object belonging to this type. -public type RawTemplate distinct object { - # An array of the strings containing the characters in BacktickString - # outside of interpolations, split at the interpolation points. - # The length of this array is one greater than - # the length of the `insertions` array. - public (readonly & string[]) strings; - # An array containing the results of evaluating the - # interpolations in the BacktickString. - public (any|error)[] insertions; -}; From d6c767e753cc3ed85c37860d2050a49030ec02ce Mon Sep 17 00:00:00 2001 From: Regina Reynolds Date: Thu, 5 Oct 2023 12:12:18 -0400 Subject: [PATCH 3/3] Fix missing semicolon --- langlib/lang.object/src/main/ballerina/object.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langlib/lang.object/src/main/ballerina/object.bal b/langlib/lang.object/src/main/ballerina/object.bal index f662960441bd..70888455817f 100644 --- a/langlib/lang.object/src/main/ballerina/object.bal +++ b/langlib/lang.object/src/main/ballerina/object.bal @@ -25,7 +25,7 @@ public type Iterable distinct object { public function iterator() returns object { public function next() returns record {| any|error value; |}|error?; }; -} +}; # Distinct RawTemplate type. # A raw template expression constructs an object belonging to this type.